Enabling remote access to Debian 7.5 with OpenSSH

I prefer to use my desktop workstation instead of sitting in front of the server; by installing the OpenSSH server I can continue using my workstation to setup the server.

Installing OpenSSH server

We install the OpenSSH server by executing the following command in a “root” shell.

apt-get install openssh-server

Configuring OpenSSH server

The configuration of OpenSSH server is stored in the /etc/ssh/sshd_config file.

Port

Port 22

By default, the OpenSSH server is listening on port 22 for connections. By adding additional Port entry combinations, additional ports are specified that the OpenSSH server is listening on.

ListenAddress

#ListenAddress 0.0.0.0

By default, the OpenSSH server socket binds on all IP addresses of the network interface. By specifying an IP address, the OpenSSH server is limited to only bind on that specific address.

ListenAddress 192.168.100.10

From the example above, the OpenSSH server will only bind to the primary IP address of the network interface, as defined in our previous article.

LoginGraceTime

LoginGraceTime 120

By default, the OpenSSH server disconnects after this period if the user has not successfully logged in. If the value is 0, there is no time limit. The default is 120 (seconds).

PermitRootLogin

PermitRootLogin yes

By default, the OpenSSH server allows that the “root” user to log in using ssh.

PermitEmptyPasswords

PermitEmptyPasswords no

By default, the OpenSSH server will not allow for the authentication to accounts with empty passwords.

Advertisements

One thought on “Enabling remote access to Debian 7.5 with OpenSSH

Comments are closed.