I have a linux box (RH 6.0) i'm using as a local sanity check (also, I can
peek in the /var/log/messages file). I figure if I get things working
locally, I can safely go out in the world.
This is a strictly local net with two machines and a printer attached.
There is no reverse IP-name lookup (or forward either..) running at the
moment - if that is relevant.
I installed ssh-1.0.27, then installed ssh-2.0.13, then stuck keys around
as recommended in Mr. Hirotaka Yamamoto's SSH2.quickstart note and set up
ssh1 compatibility as also recommended there.
Then I started the sshd2 daemon, then the sshd1 daemon, then checked to see
if they were both running - nope, only sshd2.
Checking in messages file, I see that sshd1 couldn't bind to port 22 as it
was already being used by sshd2 - Oh well, maybe that it the way it is
supposed to work under ssh1 compatibility.
Using DataFellows 30day trial Macintosh client (I determined that this is
using ssh1 protocol), I tried to log on. It hung as it did before when I
was only running the sshd2 - so much for compatibility.
So then I kill -TERM the sshd2 daemon and start up the sshd1.
Then, I tried again to log on from Mac. I got 'Rsa Failed' dialog box and
it put me into the logon config dialog box with the Password radio button
selected. I put in my regular password and voila, I was logged in. I then
went again through the rsa key copy and paste into ~/.ssh/authorized_keys
as recommended in the client copy dialog box text. I deleted the previous
key (which was the same, but without a trailing carriage return) and pasted
the new key and added a carriage return (as recommended).
I then logged out and tried to get in again using the RSA protocol. No
good - same dialog box.
Listed below are the message lines and debug output for these attempts.
I realize that many things can be wrong here - I am just hoping for some
feedback to reduce the number of things that I have to try in my random
walk toward a successful login.
Thanks in advance for your reply(s)
BobG
[root@hoho0 log]# tail messages
Jun 23 12:21:08 hoho0 sshd1[15812]: log: RSA key generation complete.
Jun 23 12:21:26 hoho0 sshd1[15814]: log: Connection from 192.168.49.19 port
2054
Jun 23 12:21:39 hoho0 sshd1[15814]: log: Rsa authentication refused for
user1: b
ad modes for /home/user1/.ssh
Jun 23 12:21:42 hoho0 sshd1[15814]: fatal: Read from socket failed:
Connection r
eset by peer
Jun 23 12:21:56 hoho0 sshd1[15816]: log: Connection from 192.168.49.19 port
2055
Jun 23 12:21:56 hoho0 sshd1[15816]: log: Password authentication for user1
accep
ted.
Jun 23 12:23:34 hoho0 sshd1[15816]: log: Closing connection to 192.168.49.19
Jun 23 12:23:46 hoho0 sshd1[15833]: log: Connection from 192.168.49.19 port
2056
Jun 23 12:23:46 hoho0 sshd1[15833]: log: Rsa authentication refused for
user1: b
ad modes for /home/user1/.ssh
Jun 23 12:23:49 hoho0 sshd1[15833]: fatal: Read from socket failed:
Connection r
eset by peer
[root@hoho0 log]
Repeating the RSA login attempt with /sshd1 -d (debug), I get output as shown:
[root@hoho0 user1]# /usr/local/sbin/sshd1 -d
debug: sshd version 1.2.27 [i686-unknown-linux]
debug: Initializing random number generator; seed file /etc/ssh_random_seed
log: Server listening on port 22.
log: Generating 768 bit RSA key.
Generating p: .......................................................++
(distan
ce 774)
Generating q: ........++ (distance 76)
Computing the keys...
Testing the keys...
Key generation complete.
log: RSA key generation complete.
debug: Server will not fork when running in debugging mode.
log: Connection from 192.168.49.19 port 2057
debug: Client protocol version 1.5; client software version W1.0
debug: Sent 768 bit public key and 1024 bit host key.
debug: Encryption type: 3des
debug: Received session key; encryption turned on.
debug: Installing crc compensation attack detector.
debug: Attempting authentication for user1.
log: Rsa authentication refused for user1: bad modes for /home/user1/.ssh
debug: RSA authentication for user1 failed.
debug: Password authentication for user1 failed.
fatal: Read from socket failed: Connection reset by peer
debug: Calling cleanup 0x8055284(0x0)
[root@hoho0 user1]#
The problem seems to be 'bad modes' for /home/user1/.ssh
Modes? - no clue here. Permissions are set as a user owned and created file.