programs:linux:openssh_client
This is an old revision of the document!
Table of Contents
Information
- OpenSSH client notes
- See OpenSSH Server notes for servers
Settings
mkdir -p ~/'.ssh' && echo -e "StrictHostKeyChecking='no'\nUserKnownHostsFile='/dev/null'\nLogLevel='QUIET'" | tee ~/'.ssh/config' > '/dev/null' && chmod '600' ~/'.ssh/config'
nano ~/'.ssh/config' && chmod '600' ~/'.ssh/config'
StrictHostKeyChecking='no' UserKnownHostsFile='/dev/null' LogLevel='QUIET'
Generate SSH Keys
Information
- Can generate both a standard keypair and one for a hardware key
- Hardware key will be used first if it's plugged-in
Standard
ssh-keygen -t 'ed25519'
FIDO/U2F Key
Send Public Key to Server
- Change
xto IP
ssh-copy-id 'espionage724'@'x'
Force Public Key Login
sudo -e '/etc/ssh/sshd_config.d/pubkey-only-custom.conf'
PasswordAuthentication no AuthenticationMethods publickey
Manage Keys
Backup
****
tar -cvzf ~/'Documents/'$(date +%Y-%m-%d)'-ssh-keys.tar.gz' -C ~ '.ssh' && ls ~/'Documents/'*'-ssh-keys.tar.gz' && sync
Restore
****
ls ~/'Documents/'*'-ssh-keys.tar.gz' && rm -Rf ~/'.ssh' && tar -xvzf ~/'Documents/'*'-ssh-keys.tar.gz' -C ~ '.ssh' && sync
/srv/www/wiki/data/attic/programs/linux/openssh_client.1793409950.txt.gz · Last modified: by Sean Rhone