29 lines
662 B
Markdown
29 lines
662 B
Markdown
|
|
## Install sshd
|
||
|
|
In order to enable ssh on Ubuntu Linux, we first need to perform an SSH package installation. Open up terminal and enter command:
|
||
|
|
|
||
|
|
$ sudo apt install sshd
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
## Create a user using command line
|
||
|
|
Let's start by creating a new user. Open up terminal and enter:
|
||
|
|
|
||
|
|
$ sudo adduser --no-create-home username
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
## Create non-login/system user
|
||
|
|
Let's start by creating a new user. Open up terminal and enter:
|
||
|
|
|
||
|
|
$ sudo useradd -r username
|
||
|
|
|
||
|
|
|
||
|
|
## Change default shell
|
||
|
|
$ grep user /etc/passwd
|
||
|
|
|
||
|
|
$ usermod --shell /bin/bash user
|
||
|
|
|
||
|
|
$ grep user /etc/passwd
|
||
|
|
|
||
|
|
## Adding User to the sudo Group
|
||
|
|
$ usermod -aG sudo username
|