brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: VisualHostKey yes draws the host key fingerprint as ASCII art

Linux
~/tips/tip-ssh-visualhostkey-ascii-art

ssh -o VisualHostKey=yes [email protected]

Prints the server host key fingerprint as ASCII art so you can compare it by shape.

Comparing a long fingerprint by eye is a poor way to check a server. A small picture is easier to remember.

With VisualHostKey yes, ssh prints an ASCII art representation of the remote host key fingerprint. The default is no. You can switch it on for one connection:

ssh -o VisualHostKey=yes [email protected]

Or put it in your config:

Host *
    VisualHostKey yes

Identical keys give identical pictures, and a changed key gives a different one. A picture with a recognisable shape is quicker to compare than 43 characters of base64. For a server you connect to for the first time, ask the owner or look in the provider’s console for the fingerprint, and compare the shapes.

The man page says that with the default no, no fingerprint strings are printed at login. With yes you see the picture at every login, which some people find noisy.

The art is another view of the same fingerprint. It only protects you if you compare it with a trusted source, and a picture you saw once is hard to remember. For a server I use daily, I would let known_hosts do the checking and keep this for first connections.

Further reading: ssh_config(5)

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link