copy file over ssh

Sometime as an administrator you want to copy file secretly from your host/server/or else and examine it anywhere else. You may use two methode here. One is using samba, you can mount it to your folder and copy it later. But not all linux system have samba. But they must have ssh installed. It’s a small program that all linux have.
The command for copying file is scp. As long as you have access for ssh port and password, you can do scp. Here are the command that we can use.
This is when you have a file to send over ssh to another host

#scp file.ext username@hostname:/yourpath/folder

This is when you grab other host file to your path

#scp username@hostname:/yourpath/to/folder/file.ext /local/folder/path

It really does make my job easier.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.