Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
openssh strange behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jeremy whiting
Apprentice
Apprentice


Joined: 25 May 2004
Posts: 159
Location: UT

PostPosted: Fri Mar 18, 2005 8:06 pm    Post subject: openssh strange behavior Reply with quote

Hi all,
the other day I started getting some weird results when trying to connect to my main desktop machine via ssh from the lan. (I used to do this every day for work purposes, so I know it worked until a couple days ago.) I'm not sure if it's a sshd problem or another pam problem, but here's what happens:

I try to login to my main machine from any other box on the lan and it asks for the password, then dies.

ssh -vv mainmachine gives:

Code:

OpenSSH_3.9p1, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to link [192.168.0.4] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.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.9p1
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
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@lysator.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@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,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@lysator.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@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,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: 132/256
debug2: bits set: 533/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'link' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug2: bits set: 488/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: /root/.ssh/identity ((nil))
debug2: key: /root/.ssh/id_rsa ((nil))
debug2: key: /root/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 0
debug2: channel 0: request shell confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to link closed.
debug1: Transferred: stdin 0, stdout 0, stderr 28 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 570.6
debug1: Exit status 254


and in the /var/log/messages on mainmachine:

Code:

Mar 18 13:01:52 link sshd[30324]: Accepted keyboard-interactive/pam for jeremy from 192.168.0.6 port 2889 ssh2
Mar 18 13:01:52 link sshd[30324]: syslogin_perform_logout: logout() returned an error


I emerged openssh with +pam and +tcpd use flags and it's version 4.0_p1

anyone have any ideas?
Back to top
View user's profile Send private message
befortin
Apprentice
Apprentice


Joined: 10 Feb 2004
Posts: 193

PostPosted: Fri Mar 18, 2005 8:25 pm    Post subject: Reply with quote

Do you have any kind of "fortune" output when you login remotely??
Back to top
View user's profile Send private message
jeremy whiting
Apprentice
Apprentice


Joined: 25 May 2004
Posts: 159
Location: UT

PostPosted: Fri Mar 18, 2005 9:12 pm    Post subject: Reply with quote

nope, no fortune output, no login at all actually, I just type the password, then get kicked out. no prompt at all.

I just did an emerge -Davut world though, and an update to cracklib that pam depends on is installing among other updates, so maybe that'll fix it... I hope.
Back to top
View user's profile Send private message
jeremy whiting
Apprentice
Apprentice


Joined: 25 May 2004
Posts: 159
Location: UT

PostPosted: Fri Mar 18, 2005 11:12 pm    Post subject: Reply with quote

Nope, still can't connect at all.

Here's the end of the log messages when I changed the sshd_config to Loglevel DEBUG3:

Code:

Mar 18 16:10:57 link sshd[31199]: debug3: tty_parse_modes: 74 0
Mar 18 16:10:57 link sshd[31199]: debug3: tty_parse_modes: 75 0
Mar 18 16:10:57 link sshd[31199]: debug3: tty_parse_modes: 90 1
Mar 18 16:10:57 link sshd[31199]: debug3: tty_parse_modes: 91 1
Mar 18 16:10:57 link sshd[31199]: debug3: tty_parse_modes: 92 0
Mar 18 16:10:57 link sshd[31199]: debug3: tty_parse_modes: 93 0
Mar 18 16:10:57 link sshd[31199]: debug1: server_input_channel_req: channel 0 request shell reply 0
Mar 18 16:10:57 link sshd[31199]: debug1: session_by_channel: session 0 channel 0
Mar 18 16:10:57 link sshd[31199]: debug1: session_input_channel_req: session 0 req shell
Mar 18 16:10:57 link sshd[31199]: debug1: PAM: setting PAM_TTY to "/dev/pts/4"
Mar 18 16:10:57 link sshd[31199]: debug1: PAM: establishing credentials
Mar 18 16:10:57 link sshd[31204]: debug1: Setting controlling tty using TIOCSCTTY.


this seems to be where it dies, or times out or whatever it's doing.

EDIT: I just copied over a plain vanilla sshd_config from another box and it works fine now, wonder what part of my old config was bad, thanks for the ideas anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum