Hi,

I simply cannot get ssh to work in the slightest. I obtained 2.9p2 source, built, and 
installed in /usr/local/openssh-2.9p2 on vanilla Red Hat Linux 6.2. I created a user 
sshtest and generated the key pair for that user as follows:

[sshtest@nano openssh-2.9p2]$ ./ssh-keygen 
Generating public/private rsa1 key pair.
Enter file in which to save the key (/home/sshtest/.ssh/identity): 
Created directory '/home/sshtest/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/sshtest/.ssh/identity.
Your public key has been saved in /home/sshtest/.ssh/identity.pub.
The key fingerprint is:
5f:c0:38:01:08:88:c4:66:b5:c7:28:4b:6a:32:86:9c sshtest@nano
[sshtest@nano openssh-2.9p2]$ ./ssh nano
The authenticity of host 'nano (192.168.1.16)' can't be established.
RSA key fingerprint is 6e:01:bc:f3:2b:4e:0a:cd:8b:75:96:70:cc:d2:82:81.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'nano,192.168.1.16' (RSA) to the list of known hosts.
sshtest@nano's password: 
Permission denied, please try again.
sshtest@nano's password: 
Permission denied, please try again.
sshtest@nano's password: 
Permission denied (publickey,password,keyboard-interactive).
[sshtest@nano openssh-2.9p2]$

Now I copied the identity.pub to authorized_keys:

[sshtest@nano .ssh]$ cd ~/.ssh
[sshtest@nano .ssh]$ cp identity.pub authorized_keys
[sshtest@nano .ssh]$ ll
total 16
-rw-r--r--    1 sshtest  sshtest       331 Jul 27 18:29 authorized_keys
-rw-------    1 sshtest  sshtest       527 Jul 27 18:23 identity
-rw-r--r--    1 sshtest  sshtest       331 Jul 27 18:23 identity.pub

Now I run the sshd daemon:

[root@nano openssh-2.9p2]# ./sshd -Dd -f ../etc/sshd_config 
debug1: Seeding random number generator
debug1: sshd version OpenSSH_2.9p2
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
socket: Address family not supported by protocol
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
Generating 768 bit RSA key.
RSA key generation complete.

Then I attempt to login with:

[sshtest@nano openssh-2.9p2]$ ./ssh nano
sshtest@nano's password: 
Permission denied, please try again.

But it does not work:

debug1: Server will not fork when running in debugging mode.
Connection from 192.168.1.16 port 1184
debug1: Client protocol version 2.0; client software version OpenSSH_2.9p2
debug1: match: OpenSSH_2.9p2 pat ^OpenSSH
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-1.99-OpenSSH_2.9p2
debug1: Rhosts Authentication disabled, originating port not trusted.
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: dh_gen_key: priv key bits set: 138/256
debug1: bits set: 1040/2049
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: bits set: 1013/2049
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user sshtest service ssh-connection method none
debug1: attempt 0 failures 0
Failed none for sshtest from 192.168.1.16 port 1184 ssh2
debug1: userauth-request for user sshtest service ssh-connection method password
debug1: attempt 1 failures 1
Failed password for sshtest from 192.168.1.16 port 1184 ssh2

What am I missing?

Thanks,
Mike

Reply via email to