Problem connecting a freebsd server using ssh

Lei Sun lei.sun at gmail.com
Thu Feb 23 00:50:44 PST 2006


Hi Guys,

I did tons of search on what problems might be, but it doesn't seems
to be the cases that I have searched even though it looks similar.

1. ssh from Freebsd_A to Freebsd_B: I got "Read from socket failed:
Connection reset by peer" error.
2. ssh from windows xp (putty) to Freebsd_B: logs me in fine
3. try to ssh from Freebsd_A to Freebsd_B again, got the same error
message, and now I can't log in from windows xp (putty) to Freebsd_B
any more, unless I reboot the windows xp machine. WIERD!!!

I check the tcp wrapper thing, the hosts.allow is All : All : allow.
So that's not the case.

I made sure all of the KeepAlive entries are set to yes, but still no luck.

Please help... Thanks in advance!

Below is the log messages...

sshd log messeges from Freebsd_B
-----------------------------------------------------------------------------------------------------------------------------
Feb 23 16:12:01 don sshd[453]: debug1: fd 5 clearing O_NONBLOCK
Feb 23 16:12:01 don sshd[453]: debug1: Forked child 649.
Feb 23 16:12:01 don sshd[649]: debug1: rexec start in 5 out 5 newsock
5 pipe 7 sock 8
Feb 23 16:12:01 don sshd[649]: debug1: inetd sockets after dupping: 3, 3
Feb 23 16:12:01 don sshd[649]: debug1: res_init()
Feb 23 16:12:01 don sshd[649]: Connection from xxx.xxx.xxx.xxx port 1199
Feb 23 16:12:02 don sshd[649]: debug1: Client protocol version 2.0;
client software version OpenSSH_4.2p1 FreeBSD-20050903
Feb 23 16:12:02 don sshd[649]: debug1: match: OpenSSH_4.2p1
FreeBSD-20050903 pat OpenSSH*
Feb 23 16:12:02 don sshd[649]: debug1: Enabling compatibility mode for
protocol 2.0
Feb 23 16:12:02 don sshd[649]: debug1: Local version string
SSH-2.0-OpenSSH_4.2p1 FreeBSD-20050903
Feb 23 16:12:02 don sshd[649]: debug1: do_cleanup
Feb 23 16:12:02 don sshd[649]: debug1: PAM: cleanup


ssh -v log from Freebsd_A
-------------------------------------------------------------------------------------------------------------------------------
$ ssh -v don
OpenSSH_4.2p1 FreeBSD-20050903, OpenSSL 0.9.7e-p1 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to xxx [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/xxxxx/.ssh/identity type -1
debug1: identity file /home/xxxxx/.ssh/id_rsa type -1
debug1: identity file /home/xxxxx/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version
OpenSSH_4.2p1 FreeBSD-20050903
debug1: match: OpenSSH_4.2p1 FreeBSD-20050903 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2p1 FreeBSD-20050903
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
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
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'don' is known and matches the DSA host key.
debug1: Found key in /home/xxxxx/.ssh/known_hosts:2
debug1: ssh_dss_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
Read from socket failed: Connection reset by peer


More information about the freebsd-questions mailing list