Operating System - HP-UX
1834456 Members
2336 Online
110067 Solutions
New Discussion

SSH/SCP problem in HP-UX 11.23 PA

 
shashi kanth
Super Advisor

SSH/SCP problem in HP-UX 11.23 PA

My target machine is running SSH.

OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005
HP-UX Secure Shell-A.04.30.007, HP-UX Secure Shell version


I can able to SSH to this box.

But "ssh date" gives no ouput.

"scp :
But all i can say is, i am using bash shell, i don't use /bin/sh .

with /bin/sh, there is no problem.

The problem is because of using bash shell.

i have installed bash shell which is given by HP itself .

Anyone tell me , what step i have to take with bash shell so that this problem own't appear ?


8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: SSH/SCP problem in HP-UX 11.23 PA

Shalom,

You have identified the problem yourself.

You are using the bash shell. By default, when you ssh to another server the environment is limited. Therefore you ssh command will provably provide output if you provide the command as follows:

ssh /usr/bin/date

Clearly HP's ssh/scp implementation was not designed to work with the bash shell.

If you however provide environment, either by building it into a script or changing the .bashrc or .bash_profile you may get it to work anyway.

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
Steven E. Protter
Exalted Contributor

Re: SSH/SCP problem in HP-UX 11.23 PA

Shalom,

You have identified the problem yourself.

You are using the bash shell. By default, when you ssh to another server the environment is limited. Therefore you ssh command will provably provide output if you provide the command as follows:

ssh /usr/bin/date

Clearly HP's ssh/scp implementation was not designed to work with the bash shell.

If you however provide environment, either by building it into a script or changing the .bashrc or .bash_profile you may get it to work anyway. I'd look at the PATH variable.

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
Dennis Handly
Acclaimed Contributor

Re: SSH/SCP problem in HP-UX 11.23 PA

Here is another thread with a similar ssh/bash problem:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1140782
shashi kanth
Super Advisor

Re: SSH/SCP problem in HP-UX 11.23 PA

"ssh /usr/bin/date" also own't work.

Dennis Handly, the URL that you have given, i am not finding any help in that.

I can't live without bash shell. Without bash shell, i can't work with any Unix/Linux box.

Please anyone tell me, how to solve this issue ?

Robert-Jan Goossens
Honored Contributor

Re: SSH/SCP problem in HP-UX 11.23 PA

Hi,

Could you add the -v option for dubbuging?

scp -v :


Regards,
Robert-Jan
shashi kanth
Super Advisor

Re: SSH/SCP problem in HP-UX 11.23 PA

It doesn't help much.


#scp -v .ssh/id_rsa.pub :.ssh/id_rsa.pub.
Executing: program /opt/ssh/bin/ssh host cayman, user (unspecified), command scp -v -t .ssh/id_rsa.pub.charger
OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005
HP-UX Secure Shell-A.04.30.007, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to cayman [15.70.188.186] 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 -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2-hpn
debug1: match: OpenSSH_4.3p2-hpn pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3p2-hpn
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 'cayman' is known and matches the RSA host key.
debug1: Found key in /.ssh/known_hosts:3
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,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t .ssh/id_rsa.pub.charger
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
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.4 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status -1
lost connection
Dennis Handly
Acclaimed Contributor

Re: SSH/SCP problem in HP-UX 11.23 PA

>i can't work with any Unix/Linux box.

I feel the same way about ksh/sh. :-)

I suppose you could change your login shell to a real shell, sh, then invoke bash to do your work.

I assume your problem isn't as simple as not having bash in /etc/shells?? shells(4)

Are there some machines where scp works? Can you use scp to your own machine?
shashi kanth
Super Advisor

Re: SSH/SCP problem in HP-UX 11.23 PA

(1)scp from Linux to HP-Ux works

(2)scp from HP-Ux to Linux works

(3)scp from HP-Ux to HP-Ux don't work.