Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


linux:ubuntu:ssh_conf

Configuring Ssh on Ubuntu

Installing and configuring SSH on Ubuntu server (If you haven't done it during installation)

If you haven't installed SSH yet, do it now:

sudo apt-get install openssh-server

Now, edit your /etc/ssh/sshd_config file Set a list of users who can login

AllowUsers user1 user2

or deny users

DenyUsers user3 user4

Display a banner to the user:

Banner /etc/issue.net

If you want to display the same banner as to users logging in on a local console

Banner /etc/issue

To edit the banner itself:

sudo vim /etc/issue.net

And restart the ssh server

sudo service ssh restart

To secure you server, disable password authentication and use SSH keys to authenticate users instead

PasswordAuthentication no
linux/ubuntu/ssh_conf.txt · Last modified: 2017/12/12 08:58 by tplecko