On 5/8/06, Tzafrir Cohen <[EMAIL PROTECTED]> wrote:
On Mon, May 08, 2006 at 11:09:08AM +0200, Maxim Vexler wrote:
> Hi list
>
> I've configured password less ssh login from one machine to the other
> using RSA keypair.
> Now when I try to open ssh connection to the remote machine I get no
> shell prompt and the termianl simply logs me out.
>
> I've tested the that connection is being established :
> <<<
> ssh -p PORT 1.2.3.4 'echo `date`:RUNNING > /tmp/ssh_stat
> >>>
>
> (Going to the remote machine and doing password interactive login )
>
> <<<
> cat /tmp/ssh_stat
> Today is Pungenday, the 55th day of Discord in the YOLD 3172:RUNNING
> >>>

Does 'ssh -v' provide more clues?

If not, start a separate sshd in debug mode on the server and connect to
it.


# ssh -v -p PORT [EMAIL PROTECTED]
OpenSSH_4.0p1, OpenSSL 0.9.7f 22 Mar 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 204.x.x.x [204.x.x.x] port PORT.
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 2
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_4.0
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 '204.x.x.x' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:6
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 204.x.x.x closed.
debug1: Transferred: stdin 0, stdout 0, stderr 38 bytes in 0.5 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 72.0
debug1: Exit status 254


Next, I've tried this thingy :
<<<
ssh -v -p PORT  [EMAIL PROTECTED] 2> /tmp/debugssh_withcmd echo 1
ssh -v -p PORT  [EMAIL PROTECTED] 2> /tmp/debugssh_nocmd

# diff /tmp/debugssh_nocmd /tmp/debugssh_withcmd
39a40
debug1: Sending command: echo 1
43,46c44,46
< Connection to 204.x.x.x closed.
< debug1: Transferred: stdin 0, stdout 0, stderr 38 bytes in 0.5 seconds
< debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 75.1
< debug1: Exit status 254
---
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 1.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0


Note that the exit status is different when running with a single command line.


Thanks for the help guys.

--
Cheers,
Maxim Vexler

"Free as in Freedom" - Do u GNU ?

Reply via email to