Thread: ssh usage
View Single Post
jldiaz's Avatar
Posts: 48 | Thanked: 40 times | Joined on Apr 2008 @ Spain
#9
Originally Posted by iliaden View Post
I'll be more specific: I need to send a file from the host (w2k) to the client (n800). Can I use cp? if so, what would it be?
$ cp /cygdrive/*/folder/file.ext /???
where do I copy it?
The required command is scp, to be issued in the tablet. It does not require the ssh session previously stablished. scp works similar to cp, only one of the files (source or destination) is located in another machine. You have to prefix that file with the name (or IP) of the machine, ended by a colon. You have to specify also the remote user if it is different from the local user.

To be more specific, the following command (issued in an xterm session in the tablet)
Code:
$ scp MyTabletFile foo@bar:folder
will stablish a ssh session with the machine bar, user foo, and copy the file MyTabletFile over this encrypted connection, leaving that file in the folder "folder" of the remote machine. This is a folder relative to the home of the user "foo" in that machine.

The command also works in the oppsite direction (but always issued from the tablet):

Code:
$ scp foo@bar:folder/file.ext .
This command will stablish a ssh session with machine bar, user foo, and copy the file ~/folder/file.ext (relative to the $HOME of the user foo in bar) to the local machine (the tablet), leaving it in the current directory (that is what means the final period).
__________________
--ル Diaz
 

The Following User Says Thank You to jldiaz For This Useful Post: