By “server”
we mean the machine you will be connecting to. Simply make sure
that the openssh-server
package is installed,
and that the sshd
service is
running[31].
The basic SSH server setup allows users to access (or
“ssh into”) a machine, provided they have an account
on it. If you want to restrict SSH access to a given list of
users, edit the /etc/ssh/sshd_config
file and
add or modify a line to look like the following:
AllowUsers queen peter@192.168.0.*
The above example will only allow users queen and peter to
connect through SSH into the machine; peter will only be
allowed access from a machine in the 192.168.0.
(local) network.
Users will have
to connect with their normal accounts and then use the
su command to become root
. To allow
users to connect as root
directly through SSH, change the
line PermitRootLogin no
to
PermitRootLogin yes
. Please bear in mind that
this setting, though convenient, is not very secure.
Please refer to sshd(8) and sshd_config(5) for more information on SSH server options and setup.
[31] Issue the service sshd start command to start it right away. The SSH service is configured to be launched at boot time.