03-14-2014 12:15 PM - last edited on 03-16-2014 07:36 PM by Lisa198503
Cannot get scp to work. Any idea what this error means? 11.31.
/var/tmp $ scp -vvv a firstname.lastname@example.org:/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
03-21-2014 05:58 PM
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 email@example.com 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 firstname.lastname@example.org" ?
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 email@example.com 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.