User Tools

Site Tools


clients:secure_shell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
clients:secure_shell [2016/09/24 20:29] Sean Rhoneclients:secure_shell [2021/09/30 23:20] (current) Sean Rhone
Line 1: Line 1:
 ====== Information ====== ====== Information ======
  
-  * Various commands for a SSH client+  * OpenSSH client notes 
 +  * See [[servers:secure_shell|OpenSSH Server]] notes for servers
  
 ====== Generate SSH Keys ====== ====== Generate SSH Keys ======
  
-****+===== Information =====
  
-  ssh-keygen --'100' -t 'ed25519'+  * Can generate both a standard keypair and one for a hardware key 
 +  * Hardware key will be used first if it's plugged-in 
 + 
 +===== Standard ===== 
 + 
 +  * [[https://wiki.archlinux.org/index.php/SSH_keys#Ed25519|ArchWiki]] 
 + 
 +  ssh-keygen -t 'ed25519' 
 + 
 +===== FIDO/U2F Key ===== 
 + 
 +  * [[https://wiki.archlinux.org/index.php/YubiKey#OpenSSH|ArchWiki]] 
 +  * Works with [[https://solokeys.com/|Solo]] 
 +  * :!: ''ed25519-sk'' didn't work with Solo 4.0.0 
 + 
 +  ssh-keygen -t 'ecdsa-sk' 
 + 
 +====== Send Public Key to Server ====== 
 + 
 +  * Change ''x'' to IP 
 + 
 +  ssh-copy-id 'espionage724'@'x' 
 + 
 +====== Force Public Key Login ====== 
 + 
 +  * [[https://wiki.archlinux.org/title/OpenSSH#Force_public_key_authentication|ArchWiki]] 
 + 
 +  sudo -e '/etc/ssh/sshd_config.d/pubkey-only-custom.conf' 
 + 
 +<code> 
 +PasswordAuthentication no 
 +AuthenticationMethods publickey</code>
  
 ====== Manage Keys ====== ====== Manage Keys ======
Line 15: Line 47:
 **** ****
  
-  cd ~ && tar -cvzf ~/'Documents/'$HOSTNAME'-ssh-keys.tar.gz' '.ssh' && sync+  tar -cvzf ~/'Documents/'$(date +%Y-%m-%d)'-ssh-keys.tar.gz' -C ~ '.ssh' && ls ~/'Documents/'*'-ssh-keys.tar.gz' && sync
  
 ===== Restore ===== ===== Restore =====
Line 21: Line 53:
 **** ****
  
-  cd ~ && rm -rf ~/'.ssh' && tar -xvzf ~/'Documents/'$HOSTNAME'-ssh-keys.tar.gz' '.ssh' && rm ~/'Documents/'$HOSTNAME'-ssh-keys.tar.gz' && sync +  ls ~/'Documents/'*'-ssh-keys.tar.gz' && rm -Rf ~/'.ssh' && tar -xvzf ~/'Documents/'*'-ssh-keys.tar.gz' -C ~ '.ssh&& sync
- +
-====== Send Public Key to Server ====== +
- +
-  ssh-copy-id 'espionage724@192.168.1.152'+
/var/www/wiki/data/attic/clients/secure_shell.1474763348.txt.gz · Last modified: 2016/09/24 20:29 by Sean Rhone