BackupPC-users

Re: [BackupPC-users] It's me again, Margret! - ssh-keygen

2009-01-09 00:58:32
Subject: Re: [BackupPC-users] It's me again, Margret! - ssh-keygen
From: Holger Parplies <wbppc AT parplies DOT de>
To: "Kenneth L. Owen" <tx836519 AT bellsouth DOT net>
Date: Fri, 9 Jan 2009 06:57:06 +0100
Hi Margret,

Kenneth L. Owen wrote on 2009-01-09 00:20:41 -0500 [Re: [BackupPC-users] It's 
me again, Margret! - ssh-keygen]:
> [...]
> Having gotten accustomed to Fedora, I prefer working as root when required
> instead of having to enter lines twice -- once without sudo, error, then
> retype it with sudo.

<Up><Ctrl-A>
or 'sudo !!'

> Also, root can navigate to some directories that normal user can't go.

Right. 'sudo sh'.

Just some suggestions, because 'sudo' really is a good habit to get into.

> [...]
> Maybe I see the problem.  On the winserver end, I put the public key in
> authorized_keys2.  Maybe Ubuntu version uses a different name from Fedora.
> Maybe I should have put the key in authorized_keys.

I'd usually try that first. I'm not sure where the authorized_keys2 and
known_hosts2 files come from (presumably protocol version 2, but not always).
If in doubt, check your man pages, though the ssh man page organization is
admittedly confusing (sshd(8) describes the authorized_keys format!? Well, it
*does* make sense, but it's not exactly intuitive for the end user).

> [...]
> root@Winserver:~/.ssh# exit
> logout
> >>>  root account can't run gedit in Ubuntu  <<<

Yes, it can (but probably $DISPLAY was not set):

> ken@Winserver:~$ sudo gedit /root/.ssh/BackupPC_id_rsa.pub
> sudo: unable to resolve host Winserver
> [sudo] password for ken: 
> Added:  from="Archiver" at beginning of BackupPC_id_rsa.pub

For the next time:

        (echo -n 'from="Archiver" '; cat BackupPC_id_rsa.pub) >> authorized_keys

But before you do that, you could try *without* the from= restriction. Whether
or not your remote IP address resolves to the string "Archiver" or something
else (have you set a domain name?) depends on your name resolution setup.
The error message "sudo: unable to resolve host Winserver" suggests that there
are problems.

> [...]
> $ ssh -l root 192.168.1.101 whoami
> [email protected]'s password:    <---Here it is asking for root password on
> Winserver

Where does that come from?

> root

Try

        $ ssh -v -l root 192.168.1.101 whoami

and maybe something like

        $ ssh -l root 192.168.1.101
        Winserver# w

to find out what Winserver thinks your hostname is.

Regards,
Holger

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/