Parrot Linux SSH Server Setup and Key-Based Login

Setting up an SSH server on Parrot Linux lets you log in to your machine from another computer over the network, copy files securely, and manage a headless box without a monitor attached. This guide walks you through a Parrot Linux SSH server setup from scratch: installing the service, starting it, locking it down with key-based login, and disabling password authentication once your keys work. Everything here applies to Debian-based Parrot, so the same apt and systemd commands work across the Home, Security, and Cloud editions.

What You Need Before You Start an SSH Server Setup

SSH has two halves. The server (the OpenSSH daemon, sshd) runs on the machine you want to reach. The client (ssh) runs on the machine you are sitting at. On Parrot Linux the client is already installed, but the server usually is not, because leaving a listening service open by default would widen the attack surface on a security-focused distribution.

Before you begin, confirm two things: you can open a terminal with sudo rights, and you know the server’s IP address on the local network. Find the address with:

ip a

Look for an address like 192.168.1.50 under your active interface (often eth0 or wlan0). Write it down — you will need it to connect. If you are unsure how user accounts and sudo work on Parrot, read our guide on the root password and sudo first.

How SSH Keys Protect You

Password login sends a secret that can be guessed, phished, or brute-forced. Key-based login works differently. Your private key never leaves your client; the server only ever sees the public key. When you connect, the server sends a challenge that only the holder of the matching private key can answer, and the answer itself reveals nothing an eavesdropper could reuse. That is why hardening an SSH server almost always means the same thing: get keys working, then turn passwords off. The rest of this guide follows exactly that order.

Install the OpenSSH Server on Parrot Linux

Update your package lists and install the server package:

sudo apt update
sudo apt install openssh-server

Once the install finishes, the service starts automatically. Check its status:

systemctl status ssh

You should see active (running) in green. If it is not running, start it and enable it so it comes back after a reboot:

sudo systemctl enable --now ssh

Parrot ships the service under the unit name ssh. On some systems sshd is an alias for the same unit, so either name may work, but ssh is the reliable one on Parrot.

Make Your First Connection With a Password

From your client machine, connect using your username and the server’s IP:

ssh youruser@192.168.1.50

The first time you connect, SSH shows the server’s fingerprint and asks you to confirm. Type yes, then enter your account password. If you land at a shell prompt, the server works. This password login is fine for testing, but it is the weakest link — automated bots scan for SSH servers and try common passwords constantly. The next sections replace password login with keys.

Generate an SSH Key Pair

A key pair is two files: a private key you keep secret on your client, and a public key you copy to the server. Anyone with the matching public key can verify your private key without ever seeing it. Generate a modern Ed25519 key on your client machine:

ssh-keygen -t ed25519 -C "you@example.com"

Press Enter to accept the default location (~/.ssh/id_ed25519). When prompted for a passphrase, set one. The passphrase encrypts your private key on disk, so a stolen laptop does not hand over your server. This creates two files:

  • ~/.ssh/id_ed25519 — your private key. Never share or copy this off the machine.
  • ~/.ssh/id_ed25519.pub — your public key, safe to copy anywhere.

Copy Your Public Key to the Parrot Server

The simplest way to install your public key is ssh-copy-id, run from the client:

ssh-copy-id youruser@192.168.1.50

It asks for your password one last time, then appends your public key to ~/.ssh/authorized_keys on the server and fixes the permissions. If ssh-copy-id is not available, do it by hand:

cat ~/.ssh/id_ed25519.pub | ssh youruser@192.168.1.50 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"

Now test the key by connecting again:

ssh youruser@192.168.1.50

This time SSH should ask for your key passphrase, not your account password. If it logs you in without asking for the account password, key login works and you are ready to harden the server.

Disable Password Login and Harden sshd

Do not skip the previous step’s test. If you turn off password login before keys work, you can lock yourself out. Once keys work, edit the server configuration:

sudo nano /etc/ssh/sshd_config

Find and set these directives (remove any leading # to uncomment them):

DirectiveValueWhy
PasswordAuthenticationnoBlocks password guessing entirely
PermitRootLoginnoForces attackers to guess a username too
PubkeyAuthenticationyesAllows your key login
KbdInteractiveAuthenticationnoCloses a second password path

Save the file, then validate the syntax before restarting so a typo does not break the service:

sudo sshd -t

If it prints nothing, the config is valid. Apply it:

sudo systemctl restart ssh

Keep your current session open and open a new terminal to test login. If the new session works with your key, the hardening is safe. If it fails, you still have the old session to fix the config.

Optional: Change the Port and Limit Users

Moving SSH off port 22 does not add real security on its own, but it cuts the noise in your logs from automated scanners. To change it, set Port 2222 in sshd_config, restart the service, and connect with ssh -p 2222 youruser@192.168.1.50. You can also restrict which accounts may log in by adding a line like AllowUsers youruser. If you run a firewall, remember to allow the new port in nftables or ufw before you disconnect.

Reaching the Server From Outside Your Network

Everything above works on your local network. To reach the server from the internet you would forward a port on your router, which also exposes it to the whole internet and its constant scanning. A safer pattern is to put the SSH server behind a WireGuard or OpenVPN tunnel and connect to it only through the VPN. If your server is a cloud box rather than a home machine, our guide to the Parrot Cloud Edition on a VPS covers hardening a public-facing host.

Copying Files Over SSH

Once the server runs, you get secure file transfer for free. Copy a file to the server with scp:

scp report.pdf youruser@192.168.1.50:~/

Pull a file back the other way by swapping the arguments. For syncing whole folders, rsync over SSH only transfers what changed:

rsync -av --progress ~/project/ youruser@192.168.1.50:~/project/

Both tools reuse your key, so there is nothing extra to configure. If you back up to the server regularly, see how we pair rsync with snapshots in the Parrot backup guide.

Troubleshooting Common SSH Problems

Connection refused. The server is reachable but nothing is listening. Confirm the service is running with systemctl status ssh and that you used the right port.

Connection timed out. The packet never arrived. Check the IP address, that both machines are on the same network, and that no firewall is dropping the port.

Permission denied (publickey). The server rejected your key. Confirm the public key is in ~/.ssh/authorized_keys on the server and that ~/.ssh is 700 and the file is 600. Wrong permissions are the most common cause. You can watch the reason in real time on the server with sudo journalctl -u ssh -f while you attempt a login.

Frequently Asked Questions

Is an SSH server safe to run on Parrot Linux?

Yes, once you disable password login and rely on keys. The risk comes from exposing a password-protected SSH server to the internet, not from SSH itself.

Should I use RSA or Ed25519 keys?

Use Ed25519. It produces short keys, is fast, and is the current default recommendation. Older RSA keys still work, but there is no reason to generate new ones.

How do I stop the SSH server when I am done?

Run sudo systemctl disable --now ssh to stop it now and keep it off after reboot. Re-enable it later with sudo systemctl enable --now ssh.