It should go in the authorized_keys file, not the known_hosts file.

Robert Trevellyan

On Mon, Mar 12, 2018 at 11:35 AM, Marc Gilliatt <m.gilli...@live.co.uk>
wrote:

> Sorry my mistake, I have now corrected myself, and I have copied the RSA
> key from the bakcuppc user and pasted it in the known hosts file for my
> client I would like backing up, however, I am still getting the Permission
> denied (publickey,password) error when I try to ssh into my client?
> ------------------------------
> *From:* Robert Trevellyan <robert.trevell...@gmail.com>
> *Sent:* 12 March 2018 15:04:37
> *To:* General list for user discussion, questions and support
> *Subject:* Re: [BackupPC-users] Can't switch users to BackupPC in
> terminal?
>
> The public key you need to copy is the one for the backuppc user, not the
> root user, because it's the backuppc user that's going to be making the
> connection (yes, you will add it to the root user's authorized_keys on the
> client, because bacuppc will sign into the client as root).
>
> Your initial error report shows this:
> */usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed:
> "/var/lib/backuppc/.ssh/id_rsa.pub"*
>
> This shows that it's trying to copy the key from the correct place. On my
> BPC4 install, /var/lib/backuppc is symlinked to /srv/backuppc, which is why
> I asked if you were working in that folder, i.e. did you 'cd /srv/backuppc'
> (or 'cd /var/lib/backuppc')?
>
>
> On Mon, Mar 12, 2018 at 10:09 AM, Marc Gilliatt <m.gilli...@live.co.uk>
> wrote:
>
> I'm sorry, I'm not too sure on what you mean by working in /srv/backuppc?
>
>
> I copied and pasted the RSA key from my backuppc server to my host I would
> like backing up. I ran the following commands,
>
>
> On my backuppc server:
>
>
> *cat /root/.ssh/id_rsa.pub > id_rsa.pub_copy  *
>
>
> On my host server:
>
> *cat id_rsa.pub_copy >> /root/.ssh/authorized_keys*
>
>
> I then switched users to backuppc, and tried to ssh to my host, however, I
> was still getting *Permission denied (publickey,password).*
> ------------------------------
> *From:* Robert Trevellyan <robert.trevell...@gmail.com>
> *Sent:* 12 March 2018 13:56:57
>
> *To:* General list for user discussion, questions and support
> *Subject:* Re: [BackupPC-users] Can't switch users to BackupPC in
> terminal?
>
> Are you working in /srv/backuppc?
>
> What is the error message?
>
> If necessary, copy the public key to a regular text file, send that to the
> host, then log into the host and append it to the authorized_keys file.
>
> Robert Trevellyan
>
> On Mon, Mar 12, 2018 at 5:33 AM, Marc Gilliatt <m.gilli...@live.co.uk>
> wrote:
>
> Hi Robert,
>
>
> I tried what you had mentioned, but sadly that didn't work. I'm still
> getting permission denied when I try to copy the RSA key to my host.
> ------------------------------
> *From:* Robert Trevellyan <robert.trevell...@gmail.com>
> *Sent:* 08 March 2018 13:14:45
> *To:* General list for user discussion, questions and support
> *Subject:* Re: [BackupPC-users] Can't switch users to BackupPC in
> terminal?
>
> You can work around this using something like this:
>
> rsync .ssh/id_rsa.pub root@10.16.0.16:/root
> ssh root@10.16.0.16
> cat id_rsa.pub >> .ssh/authorized_keys
> rm id_rsa.pub
> exit
>
> Robert Trevellyan
>
> On Thu, Mar 8, 2018 at 6:05 AM, Marc Gilliatt <m.gilli...@live.co.uk>
> wrote:
>
> So I've tried to copy my RSA key to one of my hosts whilst I was root, and
> that worked fine, I could successfully ssh into that host. However, when I
> switch users to backuppc, and try to copy the RS key to that same host, I
> still get the same error as stated in my previous email.
>
>
> /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed:
> "/var/lib/backuppc/.ssh/id_rsa.pub"
> /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to
> filter out any that are already installed
> /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
> prompted now it is to install the new keys
> Permission denied (publickey,password).
> $ ssh root@10.16.0.16
>
> I don't know why I cant copy my RSA key to my host whilst I am the
> backuppc user?
>
> ------------------------------
> *From:* Marc Gilliatt <m.gilli...@live.co.uk>
> *Sent:* 05 March 2018 10:54:23
> *To:* backuppc-users@lists.sourceforge.net
> *Subject:* Re: Can't switch users to BackupPC in terminal?
>
>
> I tried using *su - backuppc -s /bin/sh *instead and that worked, it
> allowed me to switch users to backuppc, however, when I try to copy the RSA
> key to my hosts I'm getting...
>
>
> */usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed:
> "/var/lib/backuppc/.ssh/id_rsa.pub"*
> */usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to
> filter out any that are already installed*
> */usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
> prompted now it is to install the new keys*
> *Permission denied (publickey,password).*
>
>
> ------------------------------
> *From:* Marc Gilliatt <m.gilli...@live.co.uk>
> *Sent:* 05 March 2018 09:00:52
> *To:* backuppc-users@lists.sourceforge.net
> *Subject:* [BackupPC-users] Can't switch users to BackupPC in terminal?
>
>
> I've installed BackupPC 4 and I cant switch users to backuppc to add hosts?
>
>
> I've tried...
>
>
> su - backuppc
>
>
> but it just keeps going back to the terminal, it never switches users.
>
>
> I've tried adding hosts via the GUI, and for some reason, the backups are
> failing giving the same error message...
>
> 2018-03-05 09:00:01 Can't find host ukat2 
> <http://10.16.0.163/BackupPC_Admin?host=ukat2> via NS and netbios
> 2018-03-05 09:00:01 can't ping  (client = ukat2 
> <http://10.16.0.163/BackupPC_Admin?host=ukat2>); exiting
>
> Not sure what I'm doing wrong?
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to