SSH – How to Copy File to Another Machine Through Terminal

ssh

I have Ubuntu 10.04 running through VMPlayer. And I have another machine (Asus RT-N16 router). I am able to connect to the router with telnet and see its file system.
How can I copy the file from the local machine (file is /home/user/helloworld-c) to the router (folder */tmp/mnt/discb_1*)?

Best Answer

Is there possibility to connect via SSH? Maybe you should consider "scp" utitlity. It's very simple, look to the manual page:

man scp

The very basic usage:

scp remote_user@remote_host:/path/to/remote/file /path/to/local/file

and vice versa:

scp /path/to/local/file remote_user@remote_host:/path/to/remote/file
Related Question