[[SSH]]

SSH

Useful information regarding SSH and public keys can be found here:
http://sial.org/howto/openssh/publickey-auth/

generate a public key

ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa
# or
ssh-keygen -t rsa -C "username `date +%Y-%m`" -b 4096 -f ~/.ssh/id_rsa

copy puplic key to destination

cat ~/.ssh/id_rsa.pub | ssh user@remote "cat - >> .ssh/authorized_keys"

~/.ssh/authorized_keys

See man sshd(8) for more information …

from="host.domain.tld" ssh-rsa AAAAB3Nz...

~/.ssh/known_hosts

Search for a (hashed) hostname/IP in known_hosts

ssh-keygen -F hostname

Delete a hashed hostname/IP from known_hosts

ssh-keygen -R hostname

~/.ssh/config

See man ssh_config(5) for more information …

Host = host1
        Hostname = host1.domain.tld
        Compression = yes
        CompressionLevel = 3
        User = root

Host = host2
        Hostname = host2.domain.tld
        Compression = yes
        CompressionLevel = 3
        User = root

Verify SSH Host Key Fingerprint

To verify the fingerprint you see when you connect to a new host, you can print the fingerprint beforehand on the host you want to connect to:

ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub -E md5
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub -E md5

PuTTY

http://www.chiark.greenend.org.uk/~sgtatham/putty/

If you are using Windows, you will want to use putty to connect to your beloved linux server :-)

See also my details regarding PuTTY

linux/ssh.txt · Last modified: 2016-07 by tb
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready