All tags
Start here · sshTmux for beginners, sessions, windows and panes that survive a dropped connection18 steps · 21 min read · Beginners on the Linux command lineStart the guide ssh
Narrow down
Guides5
- GuideAdvanced tmux, a config that grows with you, formats, layouts and moreThis advanced tmux guide builds on the beginners series with a modular config covering vi-style copy mode, clipboard integration, and a functional status bar. It dives into layouts, workspace scripts, formats, popups, menus, plugins like tmux-resurrect, and SSH workflows including nested tmux sessions, all tested against tmux 3.8.9 steps · 52 min read
- GuideFind out why a Linux service failed, with journalctl12 steps · 13 min read
- GuideTmux for beginners, sessions, windows and panes that survive a dropped connection18 steps · 21 min read
- GuideSet up SSH keys and a ~/.ssh/config so you can type ssh nas and nothing elseReplace password logins with SSH keys and a ~/.ssh/config file, so ssh nas is all you type, and avoid the one trap that locks you out of your own server.7 steps · 4 min read
- GuideManage your Unraid server from anywhere with Tailscale and no open portsManage your Unraid server from anywhere with Tailscale and key-only SSH, then delete the port forwards on your router, with no open ports.10 steps · 8 min read
Shell69
- Tip
scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/scp -3 copies between two remote hosts through your own machineCopy a file from one server to another with scp, routed through the machine you type on3 Dec 2026 - Tip
SetEnv PROJECT_ENV=stagingSsh SetEnv sends a variable to the server, if AcceptEnv allows itSets an environment variable in the remote session straight from your ssh config.3 Dec 2026 - Tip
Match User tunnelSshd PermitOpen limits where a user can forward ports toRestricts SSH port forwarding to a short list of host:port destinations for a user.3 Dec 2026 - Tip
LocalCommand echo "%r@%h %n" >>> ~/.ssh/connections.logSsh LocalCommand runs a command on your own machine after you connectRuns a local command right after ssh connects, with tokens such as the remote hostname.3 Dec 2026 - Tip
sudo tee /etc/update-motd.d/60-disk >/dev/null <<'EOF'Ubuntu runs your scripts in /etc/update-motd.d at every loginAdd your own status lines to the message shown when you log in.1 Dec 2026 - Tip
restrict,command="/usr/local/bin/backup.sh" ssh-ed25519 AAAAC3Nza... backup@exampleCommand= in authorized_keys locks an SSH key to one jobGive a backup or deploy key exactly one thing it may do on the server.30 Nov 2026 - Tip
PerSourcePenalties authfail:30s max:30mPerSourcePenalties is the fail2ban that newer sshd already has built inKnow how OpenSSH 9.8 and later block noisy addresses by themselves, and how to tune it.30 Nov 2026 - Tip
RemoteCommand tmux new -A -s mainRemoteCommand in ssh_config runs a command every time you connectLand in the same remote session or folder automatically when you open SSH.30 Nov 2026 - Tip
sudo usermod --expiredate 1 bobUsermod -e 1 shuts an account out, SSH keys included, a real security lockDisables an account completely, so key logins stop too, without deleting anything.30 Nov 2026 - Tip
ww is the first security check when a server feels offShows who is logged in right now, from where, and what they are running.30 Nov 2026 - Tip
CanonicalizeHostname yesCanonicalizeHostname lets you type short host names in sshMake ssh add your domain to short names and then apply the matching config block.30 Nov 2026 - Tip
ssh-keygen -Y sign -f ~/.ssh/id_ed25519 -n file release.tar.gzssh-keygen -Y sign lets your SSH key sign any fileSign and verify files with the SSH key you already have, without setting up GPG.30 Nov 2026 - Tip
ssh -4 [email protected]AddressFamily inet stops ssh from hanging on a broken IPv6 routeForce IPv4 for SSH when a host's IPv6 address resolves but does not work.30 Nov 2026 - Tip
sudo /usr/sbin/sshd -d -p 2222 -f /etc/ssh/sshd_config.newSshd -d -p 2222 tests a new SSH server config without risking your sessionRun a second sshd in the foreground on another port and watch why logins fail.30 Nov 2026 - Tip
ForceCommand internal-sftpForceCommand internal-sftp with ChrootDirectory makes an SFTP-only SSH accountGive someone file upload access in one folder without a shell on the server.30 Nov 2026 - Tip
ChannelTimeout session=30m direct-tcpip=1hChannelTimeout makes sshd close SSH sessions that sit idleLog out forgotten shells and stale tunnels after a set time of inactivity.30 Nov 2026 - Tip
ssh-keygen -c -C "work laptop 2026" -f ~/.ssh/id_ed25519ssh-keygen -c changes the comment on an SSH keyRename the label on an existing key so you can tell keys apart later.30 Nov 2026 - Tip
Host vm1HostKeyAlias stops SSH host key warnings for VMs behind one addressStore a separate host key per machine when several share one address on different ports.30 Nov 2026 - Tip
ssh-keygen -s user_ca -I alice-laptop -n alice -V +52w id_ed25519.pubssh-keygen -s signs SSH user certificates so servers trust one CASign user keys with a CA so servers stop needing every public key in authorized_keys.30 Nov 2026 - Tip
sudo ssh-keygen -Assh-keygen -A gives a cloned VM its own SSH host keysRegenerate missing host keys so cloned machines stop sharing one server identity.30 Nov 2026 - Tip
ssh -R 8080:localhost:3000 [email protected]ssh -R opens a port on the server that leads back to your machineMake a service on your laptop reachable from a remote server through the SSH connection.30 Nov 2026 - Tip
ListenAddress 192.0.2.10ListenAddress makes sshd answer on one address onlyKeep the SSH server off the public interface and listening only where you want it.30 Nov 2026 - Tip
DisableForwarding yesDisableForwarding yes switches off every kind of SSH tunnel in one lineStop users from using your SSH server as a tunnel or proxy into your network.30 Nov 2026 - Tip
Match Address 192.0.2.0/24A Match Address block in sshd_config allows passwords only from your LANUse different SSH server rules for logins from your own network and from outside.30 Nov 2026 - Tip
Match tagged tunnelTag and ssh -P give one SSH host several profilesSwitch a block of ssh_config settings on per command with a tag name.30 Nov 2026 - Tip
echo 'readonly TMOUT=900; export TMOUT' | sudo tee /etc/profile.d/tmout.shTMOUT logs out an idle shell, a simple security setting for shared serversEnds an interactive bash session after a set time without input.30 Nov 2026 - Tip
cd /var/www/uploadSftp -b runs a list of SFTP commands from a file over SSHScript uploads and downloads with sftp and stop at the first failed command.30 Nov 2026 - Tip
ssh -Q cipherssh -Q lists the algorithms your SSH client supportsSee which ciphers, key types and key exchanges your own ssh build can use.30 Nov 2026 - Tip
expiry-time="20270131" ssh-ed25519 AAAAC3Nza... guest@exampleexpiry-time in authorized_keys makes an SSH key stop working on a dateGive a temporary key a built-in end date so nobody has to remember to remove it.30 Nov 2026 - Tip
chmod 700 ~/.sshchmod 700 ~/.ssh fixes SSH keys that the server quietly ignoresCorrect the permissions sshd checks before it trusts your authorized_keys file.30 Nov 2026 - Tip
@prod:Aliases in wp-cli.yml run wp commands on a remote site over sshGives a remote WordPress site a short name so wp commands run over ssh as wp @prod.28 Nov 2026 - Tip
ssh -D 127.0.0.1:1080 [email protected]ssh -D 1080 turns an SSH connection into a SOCKS proxyStarts a local SOCKS proxy that sends your browser traffic through an SSH server.28 Nov 2026 - Tip
AddKeysToAgent yesAddKeysToAgent yes loads your key into the agent on first useMakes ssh add your private key to the agent the first time it is used.28 Nov 2026 - Tip
Include config.d/*Include in ssh config splits your hosts over several filesReads extra ssh config files from a folder, so each group of hosts gets its own file.28 Nov 2026 - Tip
ClientAliveInterval 60ClientAliveInterval lets sshd drop dead client connectionsMakes sshd check silent clients and disconnect them after a number of missed replies.28 Nov 2026 - Tip
[email protected]:~$ ~CType ~C to add a port forward to a running SSH sessionOpens ssh's own command line in a live session so you can add or cancel port forwards.28 Nov 2026 - Tip
ssh-keygen -F example.comssh-keygen -F finds a host in known_hostsSearches known_hosts for one host name and prints the entries it finds.28 Nov 2026 - Tip
ssh-keygen -t ed25519-sk -C "laptop-key"ssh-keygen -t ed25519-sk ties an SSH key to a hardware security keyCreates an SSH key that needs your hardware security key to be used.28 Nov 2026 - Tip
ssh-add -t 1h ~/.ssh/id_ed25519ssh-add -t makes an SSH key vanish from the agent after a set timeLoads an SSH key into the agent for a limited time only.28 Nov 2026 - Tip
ssh -o BatchMode=yes -o ConnectTimeout=5 [email protected] uptimessh -o BatchMode=yes makes scripts fail instead of waiting for a passwordStops ssh from asking for passwords or confirmations, so a script fails fast instead of hanging.28 Nov 2026 - Tip
ssh-keygen -H -f ~/.ssh/known_hostsssh-keygen -H hashes the host names in known_hostsTurns the host names in known_hosts into hashes so the file no longer lists your servers.28 Nov 2026 - Tip
ssh-keygen -t ed25519 -a 100 -C "laptop"ssh-keygen -a sets how many rounds protect your key passphraseRaises the number of key derivation rounds so a stolen SSH key file is harder to brute-force.28 Nov 2026 - Tip
MaxAuthTries 3MaxAuthTries limits password guesses per SSH connectionLowers how many authentication attempts sshd allows per connection, default 6.28 Nov 2026 - Tip
MaxStartups 5:50:20MaxStartups limits unauthenticated SSH connectionsCaps unauthenticated SSH connections and shortens the login window to blunt connection floods.28 Nov 2026 - Tip
PermitRootLogin noPermitRootLogin has four values, and the default is not yesShows the four PermitRootLogin values and how to see the one your server really uses.28 Nov 2026 - Tip
IdentitiesOnly yesIdentitiesOnly yes makes ssh use only the key you configuredStops ssh from offering every key in the agent and sends only the identity file you named.28 Nov 2026 - Tip
ssh -o StrictHostKeyChecking=accept-new [email protected] uptimeStrictHostKeyChecking accept-new trusts a new server once and refuses it when its key changesLets ssh add the key of a new server without asking, but still refuses a server whose key changed.28 Nov 2026 - Tip
ssh -o VisualHostKey=yes [email protected]VisualHostKey yes draws the host key fingerprint as ASCII artPrints the server host key fingerprint as ASCII art so you can compare it by shape.28 Nov 2026 - Tip
Host *UpdateHostKeys lets a server add its other host keys to your known_hostsLets a trusted SSH server hand you its additional host keys so known_hosts stays current.28 Nov 2026 - Tip
ssh-add --apple-use-keychain ~/.ssh/id_ed25519ssh-add --apple-use-keychain stores your SSH key passphrase in the macOS keychainSaves an SSH key passphrase in the macOS keychain, so it is not asked again.28 Nov 2026 - Tip
System Settings > General > Sharing > Remote LoginTurn on Remote Login to SSH into your MacLets you log in to your Mac over SSH or SFTP from another computer.28 Nov 2026 - Tip
loginctl list-sessionsloginctl terminate-session closes a stale SSH login for goodEnds a hanging login session and every process that belongs to it.27 Nov 2026 - Tip
from="192.168.1.0/24" ssh-ed25519 AAAAC3Nza... laptopFrom= in authorized_keys only accepts a key from addresses you chooseMakes an SSH key work only from the IP addresses or networks you list.27 Nov 2026 - Tip
Enter ~ .Type ~. to close a frozen SSH sessionCloses a hanging SSH session from your own keyboard without closing the terminal.27 Nov 2026 - Tip
ssh-keygen -y -f ~/.ssh/id_ed25519ssh-keygen -y rebuilds a lost public key from the private keyPrints the public key that belongs to a private key, so you can restore or match it.27 Nov 2026 - Tip
ServerAliveInterval 15ServerAliveInterval lets SSH notice a dead connectionMakes the SSH client check the server and drop a dead connection after about 45 seconds.27 Nov 2026 - Tip
AllowUsers alice [email protected]/24AllowUsers in sshd_config means only the accounts you name can log in over SSHLimits SSH logins to a short list of user names, optionally from specific addresses.26 Nov 2026 - Tip
pip3 install ssh-auditssh-audit tells you which weak algorithms your SSH server still offersChecks an SSH server's key exchange, ciphers and keys, and lists what to switch off.26 Nov 2026 - Tip
ssh-keygen -p -f ~/.ssh/id_ed25519ssh-keygen -p changes a key's passphrase without a new keyAdds, changes or removes the passphrase on an existing SSH private key.25 Nov 2026 - Tip
sshfs user@server:/srv/data ~/remotesshfs mounts a remote folder over SSH like a local driveMounts a directory from another machine on a local folder, using nothing more than an SSH login.25 Nov 2026 - Tip
ssh-add -lssh-add -l lists the keys your SSH agent has loadedShows the fingerprints of all keys held by the SSH agent, so you know what can log in for you.25 Nov 2026 - Tip
ssh -f -N -o ExitOnForwardFailure=yes -M -S ~/.ssh/fwd.sock -L 8080:localhost:80 user@serverssh -f -N -L runs a port forward in the backgroundOpens a local port forward through SSH in the background, with a clean way to close it.25 Nov 2026 - Tip
ssh-keyscan -t ed25519 example.com | ssh-keygen -lf -ssh-keyscan fetches a server's host keys so you can check fingerprintsDownloads the public host keys of a server, so you can inspect their fingerprints before trusting it.25 Nov 2026 - Tip
ssh -G myserver | grep -E '^(hostname|user|port|identityfile) 'ssh -G shows the settings SSH will really use for a hostPrints the final SSH settings for a host after every Host and Match block is applied, without connecting.24 Nov 2026 - Tip
ssh -J user@jumphost user@internal-serverssh -J reaches a server behind a jump host in one commandConnects to a server through a jump host in one step, without a manual hop.21 Nov 2026 - Tip
ssh-keygen -R nas.localssh-keygen -R removes the old host key when SSH shouts about a changed fingerprintClears the old host key so SSH stops warning about a changed fingerprint after a reinstall.17 Nov 2026 - Tip
tmux new -As worktmux new -As work attaches to a session or creates itAttaches to the tmux session called work, or creates it when it does not exist.24 Sep 2026 - Tip
"ssh": [Use action check in a Tailscale SSH rule for a re-loginMakes Tailscale SSH ask for a fresh identity check before a login, with a period you choose.10 Aug 2026 - Tip
tailscale set --sshTurn on Tailscale SSH with tailscale set --sshLets you log in over SSH to a machine using your tailnet identity instead of key files.27 Jul 2026
Git4
- Tip
Host github.comIdentityAgent tells ssh which key agent to use for each hostPoint ssh at a different agent socket per host, or switch the agent off entirely.30 Nov 2026 - Tip
ssh -T [email protected]ssh -T [email protected] checks your SSH key without cloning anythingFind out in one command which account your key logs in as on a Git host.30 Nov 2026 - Tip
git config --global gpg.format sshSign your git commits with the SSH key you already haveSigns commits with an SSH key instead of GPG, with three config lines.30 Nov 2026 - Tip
git config --global url."[email protected]:".insteadOf "https://github.com/"Url.insteadOf makes git use ssh for https GitHub addressesRewrites https GitHub URLs to ssh automatically for clone, fetch and submodules.28 Nov 2026
Storage2
- Tip
scp -O backup.tar user@old-router:/tmp/scp -O brings back the old protocol when scp fails on an old SSH serverFix scp errors on routers and old servers that have no SFTP subsystem.30 Nov 2026 - Tip
Match host nas localnetwork 192.0.2.0/24Match localnetwork picks SSH settings based on the network you are onUse a direct address at home and a jump host elsewhere, with one host name.30 Nov 2026
Media1
Network1
Security1
Docker1
Nothing matches.