Installing the SSH Daemon on Arch Linux 2017.03.01


I tried to follow the instructions on https://wiki.archlinux.org/index.php/Secure_Shell but they weren't so clear for me, since this was going into my lab, I just needed some "quick and dirty" instructions. 

NOTE: Allowing root to login directly is a security risk. In this case, since it's my lab, I'm not concerned, but if this were in production, I would strongly advise that you do not allow root to login directly as this increases the attack surface of the machine. 

1) Use the "ip addr" command to locate your local IP
    # ip addr

2) Use the "pacman" package manager to install OpenSSH
   # pacman -S openssh

3) Generate the SSH keys:
   # ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key
   # ssh-keygen -N "" dsa -f /etc/ssh/ssh_host_dsa_key
   # ssh-keygen -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key
   # ssh-keygen -N "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
   # ssh-keygen -N "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key

4) Modify the /etc/ssh/sshd_config file and uncomment the following lines
Port 22
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTH
LogLevel INFO

4b) Allow root to login through SSH
PermitRootLogin yes

5) Start SSH Daemon
# /usr/bin/sshd

If you need to restart the SSH Daemon
# kill `pidof sshd` ; /usr/bin/sshd

Comments

Popular posts from this blog

Webex Support with Windows 7

Upgrading to the Marlin firmware on the Anycubic Mega S

Installing TinyCore 8x Linux to the Hard Drive via Command Line