Gentoo Wiki


Developed by SSH Communications Security Ltd., "Secure Shell" 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. It is a replacement for rlogin, rsh, rcp, and rdist. SSH protects a network from attacks such as IP spoofing, IP source routing, and DNS spoofing.

Taken from




SSH supports many encryption techniques including:


The default implementation of ssh is openssh. To install run

emerge -av openssh

Server Setup

OpenSSH consists of two parts: a client and a server. The server is run as a daemon and has its initscript in /etc/init.d/sshd. The configuration file is at /etc/ssh/sshd_config. Before starting up an ssh server take a look through the configuration file. One thing that you will most likely want set is PermitRootLogin no. This disables logins as root which means that in order to log in, an attacker first must login as a regular user (in the wheel group) and then su. This would require knowing 2 passwords as well as a username with su access making bruteforce attacks nearly impossible.

To start the ssh server

/etc/init.d/sshd start

To start it by default

rc-update add sshd default

Client Usage

The command ssh is used to connect with ssh to a server. You can test ssh right from you own computer by running

ssh localhost

Note that you will have to have sshd running to do this. This will connect via ssh to your own computer using your own username. It will prompt for your password. Once you type that in it will drop you into a shell, probably almost exactly the same as the one you were in before. In order to leave just type exit or ctrl+d . Connecting to remote servers is basically the same


External Links

Last modified: Sun, 29 Jun 2008 05:55:00 +0000 Hits: 19,869