Arch Linux - How to Install Openssh Server

Arch Linux - How to Install Openssh Server

We need to start installing the openssh package.

pacman -S openssh
execute with root permissions

Edit your sshd_config  file as below :

Port 22
ListenAddress 0.0.0.0
PermitRootLogin yes
StrictModes yes
MaxAuthTries 6
MaxSessions 10
PasswordAuthentication yes
PermitEmptyPasswords no
/etc/ssh/sshd_config

Check if the openssh service is running.

systemctl status sshd
○ sshd.service - OpenSSH Daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

If not running start or restart if already running.

systemctl start sshd
[root@docker0 ssh]# systemctl status sshd
● sshd.service - OpenSSH Daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2021-09-22 13:46:12 BST; 2s ago
   Main PID: 792 (sshd)
      Tasks: 1 (limit: 4693)
     Memory: 920.0K
        CPU: 9ms
     CGroup: /system.slice/sshd.service
             └─792 "sshd: /usr/bin/sshd -D [listener] 0 of 10-100 startups"

Sep 22 13:46:12 docker0 systemd[1]: Started OpenSSH Daemon.
Sep 22 13:46:12 docker0 sshd[792]: Server listening on 0.0.0.0 port 22.

You can now connect to the our Arch box like below:

ssh root@192.168.45.5
tiago@desktop ~ (main)> ssh root@192.168.45.5
root@192.168.45.5's password: 
Last login: Wed Sep 22 13:48:36 2021 from 192.168.200.2
COLUMNS=157;
LINES=39;
export COLUMNS LINES;
[root@docker0 ~]# 

Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to Infoitech - [B]logging
Great! Next, complete checkout for full access to Infoitech - [B]logging
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.