question on using keys
John Griessen
john at foseda.com
Mon Mar 9 05:57:13 EST 2009
I've read man ssh and man ssh-keygen and some howtos and still am not getting what I expect.
I can do ssh john at 192.168.15.3 and login with a password OK.
I want to be able to do that with keys in preparation for running rsync with keys, so I created
a key on router1, the machine I want to ssh from.
routem at router1:~/.ssh$ lla
total 20
drwx------ 2 routem routem 4096 2009-03-08 09:55 .
drwxr-xr-x 5 routem routem 4096 2009-03-08 13:41 ..
-rw------- 1 routem routem 1675 2009-03-07 12:02 id_rsync_rsa
-rw-r--r-- 1 routem routem 397 2009-03-07 12:02 id_rsync_rsa.pub
-rw-r--r-- 1 routem routem 650 2009-03-08 09:56 known_hosts
I used scp to copy id_rsync_rsa.pub over to 192.168.15.3:/home/john/.ssh
john at toolbench:~/.ssh$ lla
total 60
drwx------ 2 john cibolo 4096 2009-03-08 09:54 .
drwxrwxr-x 162 john cibolo 12288 2009-03-08 11:47 ..
-rw-r--r-- 1 john john 4096 2005-11-26 09:26 .known_hosts.swo
-rw------- 1 john john 963 2006-10-15 13:26 IDENTITY
-rw-r--r-- 1 john john 963 2006-10-15 13:26 IDENTITY.cibolo
-rw------- 1 john john 397 2009-03-07 15:04 authorized_keys2
Now I try the below command:
ssh -2 -vvv -i "/home/routem/.ssh/id_rsync_rsa" john at 192.168.15.3
It comes to problems right away:
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug3: key names ok: [ssh-dss,ssh-rsa]
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.15.3 [192.168.15.3] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /home/routem/.ssh/id_rsync_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
My ssh-config on both machines is default plus these lines:
Protocol 2,1
HostKeyAlgorithms ssh-dss,ssh-rsa
after the above wrong looking log lines this also looks suspicious:
debug2: key: /home/routem/.ssh/id_rsync_rsa (0x7007dae0)
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/routem/.ssh/id_rsync_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
it drops to password and that will work if entered.
Any hints appreciated.
John Griessen
More information about the openssh-unix-dev
mailing list