Operating System - HP-UX
1753253 Members
4412 Online
108792 Solutions
New Discussion юеВ

SSH problem between 2 server

 
Pelephone System
Frequent Advisor

SSH problem between 2 server

Hello guys,
I have a strange problem, we have 2 servers, when I sftp to the first account everything is working fine:

root@vendors: sftp -v e132076@205.140.7.156
Connecting to 205.140.7.156...
OpenSSH_3.9, OpenSSL 0.9.7d 17 Mar 2004
HP-UX Secure Shell-A.03.91.002, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to 205.140.7.156 [205.140.7.156] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/3
debug1: identity file /.ssh/id_rsa type 1
debug1: identity file /.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version ReflectionForSecureIT_6.1.0.16
debug1: no match: ReflectionForSecureIT_6.1.0.16
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9
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: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '205.140.7.156' is known and matches the DSA host key.
debug1: Found key in /.ssh/known_hosts:7
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
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: hostbased,publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
sshd2[19354]: WARNING: Pattern "" is invalid.
sshd2[19354]: WARNING: Pattern "" is invalid.
sftp>


Here is the output of the second account:
root@vendors: sftp -v e131996@205.140.7.156
Connecting to 205.140.7.156...
OpenSSH_3.9, OpenSSL 0.9.7d 17 Mar 2004
HP-UX Secure Shell-A.03.91.002, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to 205.140.7.156 [205.140.7.156] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/3
debug1: identity file /.ssh/id_rsa type 1
debug1: identity file /.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version ReflectionForSecureIT_6.1.0.16
debug1: no match: ReflectionForSecureIT_6.1.0.16
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9
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: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '205.140.7.156' is known and matches the DSA host key.
debug1: Found key in /.ssh/known_hosts:7
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
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: hostbased,publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
sshd2[16946]: WARNING: Pattern "" is invalid.
sshd2[16946]: WARNING: Pattern "" is invalid.
/bin/rksh: No such file or directory
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.6 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
Connection closed
HPUX sysadmin
8 REPLIES 8
F Verschuren
Esteemed Contributor

Re: SSH problem between 2 server

can you show the passwd lines?
I think that the users does not have the same shell... please correct the shell of the user that is not jet working.
Steven E. Protter
Exalted Contributor

Re: SSH problem between 2 server

Shalom,

This indicates issue with the .ssh folder, keys ownership or permission. Perhaps some files got deleted.

ssh-keygen might help.

http://www.ssh.com/support/documentation/online/ssh/adminguide-zos/54/ssh2.html

http://docstore.mik.ua/orelly/networking_2ndEd/ssh/ch08_02.htm

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
smatador
Honored Contributor

Re: SSH problem between 2 server

Hi,
Another idea is the "/bin/rksh no such file".
Try to check rksh or perhaps pass this for example
ln -s /usr/bin/rksh /bin/rksh
You could also put the rksh on /etc/shells
Hope it helps
AwadheshPandey
Honored Contributor

Re: SSH problem between 2 server

Problem seems in this line

sshd2[16946]: WARNING: Pattern "" is invalid.
/bin/rksh: No such file or directory
debug1: channel 0: free: client-session, nchannels 1

You donot have /bin/rksh on your destination server. Pls change the user's shell or add /bin/rksh shell to destination server.

Regards,

Awadhesh
It's kind of fun to do the impossible
Pelephone System
Frequent Advisor

Re: SSH problem between 2 server

Well,
The problem is that both of the users use the same shell :
# grep e132076 /etc/passwd

e132076:x:23948:33330:EDT Support Dir (EDT Customer #3333) (jn):/edt/data/33330:/bin/rksh



# grep e131996 /etc/passwd

e131996:x:23744:33334:EDT Support Dir (EDT Customer #3333) (jn):/edt/data/33334:/bin/rksh

the permissions of the ssh files are the same, more than that, we copied the ssh files from the working user to the not working user (and changed ownership of course) and its still not working :\
HPUX sysadmin
OldSchool
Honored Contributor

Re: SSH problem between 2 server

on both servers do:

ls -l /bin/rsh

what do you get?
according to your first post, it may be missing on e131996@205.140.7.156
OldSchool
Honored Contributor

Re: SSH problem between 2 server

gonna be one of those days...that should be

on both servers do:

ls -l /bin/rksh

what do you get?
according to your first post, it may be missing on 205.140.7.156
Pelephone System
Frequent Advisor

Re: SSH problem between 2 server

Well, Problem is solved.
The problem was that some security software was installed on the second server, and it denied access for the user to the rksh.

thnx alot for the help !
HPUX sysadmin