The commands listed belows are some that we use often in our regular use, but many more exist, and you should check the man page and documentation for more details. The ssh Secure Shell command
provides secure encrypted communications between two untrusted hosts over an insecure network. It is a program for logging securely into a remote machine and executing commands from there. It is a suitable replacement
for insecure programs like telnet, rlogin, rcp, rdist, and rsh.
To login to a remote machine, use the command:
Example 15-1. Remote login using ssh
[email protected] password:
Last login: Tue Oct 19 1999 18:13:00 -0400 from deep.openna.com
Where <login_name> is the name you use to connect to the ssh server and <hostname> is the remote address of your ssh server.
The scp Secure Copy utility copies files from the local system to a remote system or vice versa, or even between two remote systems using the scp command. To copy files from remote to local system, use
the following command:
Example 15-2. scp Secure Copy utility
Enter passphrase for RSA key '[email protected]':
test1 | 2 KB | 2.0 kB/s | ETA: 00:00:00 | 100%
To copy files from local to remote system, use the following command:
Example 15-3. local to remote
[email protected]'s password:
test2 | 7 KB | 7.9 kB/s | ETA: 00:00:00 | 100%
The -p option indicates that the modification and access times, as well as modes of the source file, should be preserved on the copy. This is usually desirable.
Some possible uses of OpenSSH softwareare:
Replace telnet, rlogin, rsh, rdist, and rcp.
Make secure backups over the network.
Execute remote commands.
Access to corporate resources over the Internet.