16.8. SSH2 Users Tools

The commands listed below 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.

ssh2. Ssh2, Secure Shell 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 program like telnet, rlogin, rcp, rdist, and rsh. To login to a remote machine, use the command:

         [root@deep] /#ssh2 -l <login_name> <hostname>         
         

Example 16-1. login to a remote using ssh2


         [root@deep] /#ssh2 -l admin www.openna.com
         

         Passphrase for key "/home/admin/.ssh2/id_dsa_1024_a" with comment "1024-bit dsa, admin@deep.openna.com, Tue Oct 19 1999 14:31:40 -0400":
         admin's password: 
         Last login: Tue Oct 19 1999 18:13:00 -0400 from deep.openna.com
         No mail.
         

         [admin@www ]/admin$
         

Where <login_name> is the name you use to connect to the ssh2 remote server and <hostname> is the address of your ssh2 remote server.

sftp2. The sftp2, Secure File Transfer utility is an ftp-like client that provides file transfers over the network. You must already be connected with ssh2 before using the sftp2 utility. To ftp over ssh2, use the following command:

         [admin@deep /]$sftp2 <hostname>
         

Example 16-2. sftp2, Secure File Transfer


         [admin@deep /]$sftp2 www.openna.com
         

         local path  : /home/admin
         Passphrase for key "/home/admin/.ssh2/id_dsa_1024_a" with comment "1024-bit dsa, admin@deep.openna.com, Tue Oct 19 1999 14:31:40 -0400":
         admin's password: 
         admin's password: 
         remote path : /home/admin
         

         sftp>
         

Where <hostname> is the name of the remote server you want to sftp.