Monday, June 9, 2008

Using SSH

SSH is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another. It provides strong authentication and secure communications over insecure channels. SSH is most useful when logging into a UNIX machine from another machine where the traditional telnet and rlogin programs would not provide password and session encryption.

Now we'll take a look at some basic SSH commands in networking.
To login to a remote machine running sshd server you can use the any of the following formats.

# ssh -l remote_user host_name_or_ip
# ssh remote_user@host_name_or_ip
# ssh -l root
# ssh

To execute a command on the remote machine without logging in explicitly you can use,
# ssh -l remote_user host_name_or_ip remote_command
# ssh -l bud@ /usr/bin/x11/xclock
It starts the xclock application in the remote machine.

To ftp securely you can use sftp.
# sftp bud@

sftp> cd downloads - Used to change directory
sftp>mput *.rpm - Used to upload multiple files
sftp>mget httpd* - Used to download multiple files
sftp>help - See a list of commands

To copy files from one host to another try
# scp [-r] source user@remote_host:target
# scp bud@ /tmp

Still there is SSH server and client configuration and do you knw how to configure passwordless SSH login?

No comments: