Moving files with ssh??

zypher_X

Registered
Newbee question:

I would like to connect to my account at my university and move file in both diractions. I can without problems connect with ssh and run commandline programs on my account there. But I dont know howto copy a file from the account.

Any help?

/Zypher
 
have a look at 'man scp'.. Should be just what you're looking for..

For example, if I was copying a file from my local machine to a server, it would be something like:

scp filename.ext user@host:/destination/directory

It also works with directories:

scp -r directory user@host:/destination/directory

..and the reverse

scp user@host:/some/directory/filename.ext .

IOW, similar to rcp, only secure (it'll prompt you for password as needed)...
 
And for the lazy typist (like me) who usually copies to the home directory, you can

Code:
scp somefile.tar user@remote:

to put it straight into your homedir; this is useful if you have accounts at different companies/ISPs/servers/etc where each one has different logic for placing homes, and you don't remember which is which.
 
even easire imo, is a command line program called 'sftp'. It works alot like the command line program 'ftp'.

Its interactive, lets you list files, download, chmod, upload, etc.
use it like this:
sftp host
or:
sftp username@host
 
After beating myself up for a few hours wondering why sftp wouldn't work, I remembered to use the '-v' option when logging in and realized that I had renamed the default 'id_dsa' private keyfile to something a little more descriptive. In the meantime, default sftp looks for something called 'id_dsa' in your .ssh/ folder and if it's not there, it won't be able to begin the authentication process.

Double-check those keynames if you've been having troubles!

Cheers.

Originally posted by kilowatt
even easire imo, is a command line program called 'sftp'. It works alot like the command line program 'ftp'.

Its interactive, lets you list files, download, chmod, upload, etc.
use it like this:
sftp host
or:
sftp username@host
 
Back
Top