scp no worky?


I ran into a weird problem where the scp command would refuse to copy a file to a remote host.

The command would complete OK (exit status of 0), but nothing would ever get copied. Head scratcher, and nothing obvious on stackoverflow.


The culprit:  http://www.openssh.org/faq.html#2.9


 sftp/scp fails at connection, but ssh is OK.

sftp and/or scp may fail at connection time if you have shell initialization (.profile, .bashrc, .cshrc, etc) which produces output for non-interactive sessions. This output confuses the sftp/scp client. You can verify if your shell is doing this by executing:
ssh yourhost /usr/bin/true
If the above command produces any output, then you need to modify your shell initialization.

Comments

Popular posts from this blog

Introducing ds-operator, the ForgeRock Directory Services Operator for Kubernetes

OAM R2 REST APIs for Policy Management

Automating OpenDJ backups on Kubernetes