This is one of the commonest errors that are thrown when trying to copy files over scp. The major reason for this is, the port being different from the default 22.
pradeeban@pradeeban:~$ scp -r /home/pradeeban/patches root@116.12.92.113:/mnt/patches ssh: connect to host 116.12.92.113 port 22: Connection refused lost connection
To fix this, use -P flag, and the port number. Notice the upper case. This is to maintain the consistency with the -p usage of cp command.
pradeeban@pradeeban:~$ scp -P 1984 -r /home/pradeeban/patches root@116.12.92.113:/mnt/patches
Find further useful tips at, http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks
No comments:
Post a Comment
You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.