Secure Shell Getting started with Secure Shell Installation or Setup


Example

Free version of SSH protocol implementation, OpenSSH is available in all the Linux distributions. It consists of the server and client packages.

Installation

On Debian-based Linux, you can install openssh using

# apt-get install openssh-server openssh-client

On RHEL/CentOS you need to use yum:

# yum install openssh-server openssh-clients

Current Fedora is using dnf instead of yum.

On Arch Linux, use pacman:

# pacman -S openssh

On OSX, the openssh should be already installed.

If you want to use more recent version, you need to install the openssh from brew:

# brew install openssh --with-brewed-openssl --with-keychain-support

TODO Instructions for Windows

Setup

The openssh client does not need any special setup and is ready to use just after installation. You can try that running ssh remote, where the remote is the remote host running ssh server.

The openssh server is usually started after the installation and default setup is applied. If not, you can start it on systemd based systems using

On Debian-based Linux with systemd:

# systemctl start ssh

On RHEL/CentOS/Fedora and Arch Linux:

# systemctl start sshd

Or on upstart systems using

# service sshd start

Configuration

The openssh have configuration files under /etc/ssh/. The client is also reading client configuration in ~/.ssh/config. The server is using a file sshd_config, which contains most of the default values and contains simple key-value pairs. Example:

Protocol 2
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
X11Forwarding yes
Subsystem    sftp    /usr/libexec/openssh/sftp-server