Posted By: Anonymous
I’m trying to copy my .profile, .rvm and .ssh folders/files to a new computer and keep getting a “not a regular file” response. I know how to use the
ssh commands but I’m not sure how to use them in order to transfer files from one computer to another.
Any help would be great, thanks!
You can do this with the
scp command, which uses the ssh protocol to copy files across machines. It extends the syntax of
cp to allow references to other systems:
scp [email protected]:/path/to/file [email protected]:/path/to/other/file
Copy something from this machine to some other machine:
scp /path/to/local/file [email protected]:/path/to/remote/file
Copy something from another machine to this machine:
scp [email protected]:/path/to/remote/file /path/to/local/file
Copy with a port number specified:
scp -P 1234 [email protected]:/path/to/remote/file /path/to/local/file