SSH publickey auth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I am trying to get Publickey authentication running between a MS box and my linux server
Can someone tell me what im doing wrong?
Maybe it is the hostname being localhost.localdomain, when I log in with reddawn.dyndns.org ?

This is what I did so far

on the server:
[rlback@localhost ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/rlback/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/rlback/.ssh/id_rsa.
Your public key has been saved in /home/rlback/.ssh/id_rsa.pub.
The key fingerprint is:
a9:b1:ac:29:22:15:54:47:2d:f0:42:12:78:39:df:cb rlback@xxxxxxxxxxxxxxxxxxxxx
[rlback@localhost ~]$ cd .ssh/
[rlback@localhost .ssh]$ ll
total 32
-rw-------  1 rlback rlback 951 Jul  8 13:43 id_rsa
-rw-r--r--  1 rlback rlback 238 Jul  8 13:43 id_rsa.pub
[rlback@localhost .ssh]$ su
Password:
[root@localhost .ssh]# vi /etc/ssh/sshd_config
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys

[root@localhost .ssh]# /etc/init.d/sshd stop
Stopping sshd:                                             [  OK  ]
[root@localhost .ssh]# /etc/init.d/sshd start
Starting sshd:                                             [  OK  ]
[root@localhost .ssh]# exit
exit
[rlback@localhost .ssh]$ ll
total 16
-rw-------  1 rlback rlback 951 Jul  8 13:43 id_rsa
-rw-r--r--  1 rlback rlback 238 Jul  8 13:43 id_rsa.pub
[rlback@localhost .ssh]$ cat id_rsa.pub >> authorized_keys
[rlback@localhost .ssh]$ chmod 600 authorized_keys
[rlback@localhost .ssh]$ cd ..
[rlback@localhost ~]$ chmod 700 .ssh
[rlback@localhost ~]$ ls -la
total 64
drwxr-xr-x    4 rlback rlback 4096 Jul  8 13:37 .
drwxr-xr-x    5 root   root   4096 Jul  7 16:54 ..
-rw-------    1 rlback rlback  231 Jul  8 13:37 .bash_history
-rw-r--r--    1 rlback rlback   24 Jul  7 16:54 .bash_logout
-rw-r--r--    1 rlback rlback  191 Jul  7 16:54 .bash_profile
-rw-r--r--    1 rlback rlback  124 Jul  7 16:54 .bashrc
drwxrwxr-x  102 rlback rlback 4096 Jun 23 16:17 snapshots
drwx------    2 rlback rlback 4096 Jul  8 13:48 .ssh
[rlback@localhost ~]$ cd .ssh/
[rlback@localhost .ssh]$ ll
total 24
-rw-------  1 rlback rlback 238 Jul  8 13:48 authorized_keys
-rw-------  1 rlback rlback 951 Jul  8 13:43 id_rsa
-rw-r--r--  1 rlback rlback 238 Jul  8 13:43 id_rsa.pub
[rlback@localhost .ssh]$ chmod 600 *
[rlback@localhost .ssh]$ ll
total 24
-rw-------  1 rlback rlback 238 Jul  8 13:48 authorized_keys
-rw-------  1 rlback rlback 951 Jul  8 13:43 id_rsa
-rw-------  1 rlback rlback 238 Jul  8 13:43 id_rsa.pub
[rlback@localhost .ssh]$

I then coppied the keys to the client ( windows machine )

C:\cwrsync>mv "\Documents and Settings\myep\Desktop\id_rsa" "\Documents and Settings\myep\.ssh
C:\cwrsync>cat id_rsa.pub >> known_hosts

C:\cwrsync>ssh -vvv rlback@xxxxxxxxxxxxxxxxxx
OpenSSH_3.8.1p1, OpenSSL 0.9.7c 30 Sep 2003
debug2: ssh_connect: needpriv 0
debug1: Connecting to reddawn.dyndns.org [68.79.53.81] port 22.
debug1: Connection established.
debug1: identity file /cygdrive/c/Documents and Settings/myep/.ssh/identity type -1 debug3: Not a RSA1 key file /cygdrive/c/Documents and Settings/myep/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /cygdrive/c/Documents and Settings/myep/.ssh/id_rsa type 1 debug1: identity file /cygdrive/c/Documents and Settings/myep/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.0
debug1: match: OpenSSH_4.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysat
or.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysat
or.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysat
or.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysat
or.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@xxxxxxxxxxx,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 127/256
debug2: bits set: 516/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /cygdrive/c/Documents and Settings/myep/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 2
debug3: check_host_in_hostfile: filename /cygdrive/c/Documents and Settings/myep/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 2
debug1: Host 'reddawn.dyndns.org' is known and matches the RSA host key.
debug1: Found key in /cygdrive/c/Documents and Settings/myep/.ssh/known_hosts:2
debug2: bits set: 520/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /cygdrive/c/Documents and Settings/myep/.ssh/identity (0x0)
debug2: key: /cygdrive/c/Documents and Settings/myep/.ssh/id_rsa (0x100e9c40)
debug2: key: /cygdrive/c/Documents and Settings/myep/.ssh/id_dsa (0x0)
debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-with-mic,password
debug3: preferred 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: Trying private key: /cygdrive/c/Documents and Settings/myep/.ssh/identity debug3: no such identity: /cygdrive/c/Documents and Settings/myep/.ssh/identity debug1: Offering public key: /cygdrive/c/Documents and Settings/myep/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug2: input_userauth_pk_ok: fp a9:b1:ac:29:22:15:54:47:2d:f0:42:12:78:39:df:cb
debug3: sign_and_send_pubkey
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/cygdrive/c/Documents and Settings/myep/.ssh/id_rsa':
Ctrl-C




--
Michael Yep
Development / Technical Operations
RemoteLink, Inc.
(630) 983-0072 x164

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux