you can scp - which will allow you to securely copy between hosts.
to learn more you can do man scp
Its located in /usr/bin on linux. SCP or secure copy command copies files and directories from one computer to another in batch. (For interactive user interface you can use SFTP as "user545035" stated. It encrypts all communication between the two machines.
$ scp my file remote.example.com:newfile
$ scp -r mydir remote.example.com:
$ scp remote.example.com:myfile .
$ scp -r remote.example.com:mydir .
TO specify an alternate username on the remote system, use the username@host syntax:
$ scp myfile solidariti@remote.example.com :
Useful options:
-p: Duplicate all file attributes (permissions, timestamps) when copying.
-r: Recursively copy a directory and its contents.
-v: Produce verbose output, useful for debugging.
SFTP (host|username@host) openssh-client
located in the /usr/bin
directory.
The sftp program copies files interactively between two computers. (As opposed to scp, which copies files in batch.) The user interface is much like that of ftp.
$ sftp remote.example.com
password: ******
sftp> cd MyFiles
sftp> ls
README
...
sftp> get README
Fetching /home/solidariti/Myfiles/README to README
If you username is different from your local one, use the username@host argument:
$ sftp solidariti@remote.example.com
Hope this gets you on your way.
It has to be case sensitive. – Ricardo – 2018-03-29T11:07:47.187