User Tools

Site Tools


network:ssh

Differences

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

Link to this comparison view

Next revision
Previous revision
network:ssh [2022/06/10 19:19] – external edit 127.0.0.1network:ssh [2024/11/29 20:27] (current) – passphrase change and no host check rene
Line 10: Line 10:
 ssh <user>@server -D <localIP>:<localPort> ssh <user>@server -D <localIP>:<localPort>
 </code> </code>
- + 
 +=== SSH no host check === 
 +<code> 
 +ssh <user>@server -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null 
 +</code> 
 === Create SSH key pair === === Create SSH key pair ===
 <code> <code>
Line 21: Line 26:
 -b = bitrate. For rsa and ecdsa. -b = bitrate. For rsa and ecdsa.
 </code> </code>
 +
 +=== Create SSH key pair with Yubikey ===
 +Prerequsites:
 +  * openssh v8.2+
 +  * yubikey fw v5.2.3+
 +  * libfido2 lib installed on client
 +
 +Check openssh version.
 +<code>
 +ssh -V
 +</code>
 +
 +Check yubikey version.
 +<code>
 +lsusb -v 2>/dev/null | grep -A2 Yubico | grep "bcdDevice" | awk '{print $2}'
 +</code>
 +
 +Create the key-pair
 +<code>
 +ssh-keygen -o -a 100 -t ed25519-sk -C "<key comment>" -f ~/.ssh/<keyname>
 +</code>
 +
 +=== Change key comment ===
 +<code>
 +ssh-keygen -c -C "<key comment>" -f ~/.ssh/<keyname>
 +</code>
 +
 +=== Change passphrase ===
 +<code>
 +ssh-keygen -p -f ~/.ssh/<keyname>
 +</code>
 +
 === GIT Specify Key === === GIT Specify Key ===
 edit //~/.ssh/config// and add section like the following edit //~/.ssh/config// and add section like the following
Line 29: Line 66:
   IdentitiesOnly yes   IdentitiesOnly yes
 </code> </code>
 +
 === Redhat custom port === === Redhat custom port ===
 Edit ///etc/ssh/sshd_config// and add the lines (uncomment port 22)  Edit ///etc/ssh/sshd_config// and add the lines (uncomment port 22) 
network/ssh.1654881591.txt.gz · Last modified: 2022/06/10 19:19 by 127.0.0.1