Discover How To Learn Tips And Tricks HOWTOs
Download and install the rpms:
openssl-0.9.5a-3.i386.rpm openssh-2.1.1p4-1.i386.rpm openssh-server-2.1.1p4-1.i386.rpm openssh-clients-2.1.1p4-1.i386.rpm
After reading man sshd, although it is probably correct as is, read /etc/ssh/sshd_config. Since OpenSSH uses TCP_WRAPPERS, add the hosts to be allowed to use SSH into /etc/hosts.allow and block everyone else in /etc/hosts.deny. An example for /etc/hosts.allow that allows everyone in the 192.168.1 subnet to use SSH is:
In /etc/hosts.deny, add this line to default block everyone from using Secure SHell:
Start sshd by running:
To use the SSH client, first you must make a key. Run
ssh-keygen creates a public and private key to be used for encryption and decryption of data sent through the encrypted tunnel. Here is a sample run of ssh-keygen:
[[email protected] sabaka00]# ssh-keygen Generating RSA keys: ...............................ooooooO...ooooooO Key generation complete. Enter file in which to save the key (/sabaka00/.ssh/identity): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /sabaka00/.ssh/identity. Your public key has been saved in /sabaka00/.ssh/identity.pub. The key fingerprint is: c2:ff:74:c5:e5:7d:b7:23:56:bb:11:8c:8a:97:77:7a [email protected] [[email protected] sabaka00]#
For more information about ssh-keygen, read man ssh-keygen.
Once you have created the public and private keys, copy the public key, normally found at $HOME/.ssh/identity.pub, to the host that is going to be connected to. The key should be in $HOME/.ssh/authorized_keys of the user that will be logged into on the remote system. Make sure the public key is on a single line in the authorized_keys file.
After the keys are set up on the local and remote systems, connect to an SSH server like this:
ssh -l <Login name> -i <identity file> host
An example would be:
Read man ssh for more information about the different command-line options for ssh.