Secure
Using SSH
You must have a user account and password on the remote host or connection will fail. The remote host must be running ssh server. You can check for sshd using ps and grep.
ps -e | grep sshd
1493 ? 00:00:00 sshd
To log into a remote host using ssh, do:
ssh remotehost
myname@remotehost password:
Enter the password for the account on the remote host to gain access.
Using SCP
Using scp is similar to using ssh, in how you log in to the remote host. Once your in, the similarity ends.
To copy files from a remote host into the current directory do:
scp myname@remotehost:/filetocopy .
Notice the colon after the host name. Its important. Followed by the path to the file you want to copy. Finally at the end the dot '.' or period. That tells Linux to place the copied file in this directory. The dot is short hand for 'the current directory'.
Copying files from my box to a remote host is pretty much the same command, rehashed.
scp filetocopy myname@remotehost:/directory/to/copy/to
Give it a shot. See how ya go.
That's about it.
Done!

Comments :
0 comments to “Using SSH And SCP”
Post a Comment