To Install ssh server
-> sudo apt-get install openssh-server
SSH uses the current user when accessing a remote server. To specify a user for an SSH connection
-> ssh username@hostname_or_ip
To connect to a remote host with a custom SSH port number, use the -p
flag. For example
-> ssh username@hostname_or_ip -p <PORT>
If you are on the computer(Local) from which you want to send file to a remote computer:
->scp /file/to/send username@remote:/where/to/put
On the other hand if you are on the computer(Local) wanting to receive file from a remote computer:
->scp username@remote:/file/to/send /where/to/put
Copy folder from local to remote :
->scp -r /path/to/folder username@remote:/where/to/put
Copy folder from remote to local :
->scp -r user@your.server.example.com:/path/to/foo /home/user/Desktop/