Operating System - HP-UX
1751961 Members
4695 Online
108783 Solutions
New Discussion

Re: scp problems: lost connection

 
dictum9
Super Advisor

scp problems: lost connection

 

Cannot get scp to work.     Any idea what this error means? 11.31.

 

/var/tmp $ scp -vvv a root@xxx.xx.xx.xx:/var/tmp Executing: program /opt/ssh/bin/ssh host xxx.xx.xx.x, user root, command scp -v -t /var/tmp lost connection

 

P.S. This thread has been moved from  HP-UX>System Administration to HP-UX > networking. -HP Forum Moderator

1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: scp problems: lost connection

OpenSSH-based versions of scp use the ssh command as a pipeline to pass the data to/from another host.

(Commercial SSH implementations might use the SFTP protocol instead.)


The scp command says it's running this ssh command:

/opt/ssh/bin/ssh root@xxx.xx.xx.x scp -v -t /var/tmp

 In effect, it's running another copy of the scp command in the remote host, with special options that allow the remote scp process to accept data from the local one.

 

The error message is simply "lost connection". It means that the underlying SSH connection failed in some way.

 

So, you might want to try to establish a similar SSH connection manually.

 

What is the output if you run "ssh -vvv root@xxx.xx.xx.xx" ?

 

If the SSH connection works, then the remote scp command might not be located in the $PATH for the non-interactive login. (Non-interactive logins sometimes have a simpler $PATH setting than the interactive ones.)

While still logged in to the remote host, run "which scp" to see where the scp command is located on the remote host.

Then logout from the remote host.

 

Run "ssh root@xxx.xx.xx.xx echo \$PATH" to see the $PATH setting for non-interactive logins on the remote host.

If the setting does not include the directory where the remote scp command was located, the problem is that the remote non-interactive login session fails to find the scp command.

MK