infrastructure:ssh
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| infrastructure:ssh [2018-06-19 13:01] – mrks | infrastructure:ssh [2021-01-26 21:23] (current) – mrks | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SSH ====== | ====== SSH ====== | ||
| + | |||
| + | ===== Use SSH keys ===== | ||
| + | |||
| + | In case there is no '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * Paste the public key to the file | ||
| + | |||
| + | Set the permissions for the '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| ===== SSH and SCP on Windows with smartcard authentication ===== | ===== SSH and SCP on Windows with smartcard authentication ===== | ||
| Line 16: | Line 30: | ||
| * " | * " | ||
| * Copy fingerprint and remove the spaces | * Copy fingerprint and remove the spaces | ||
| - | * Run: '' | + | * Run: '' |
| * PuTTY using smartcard authentication | * PuTTY using smartcard authentication | ||
| * Ensure that pageant.exe is still running in the system tray | * Ensure that pageant.exe is still running in the system tray | ||
| Line 33: | Line 47: | ||
| - | ===== Converting X509 certificate to SSH public key ===== | + | ===== Converting |
| - | * Export in Windows | + | |
| - | * certmgr.msc | + | |
| - | * Browse to certificate | + | * certmgr.msc |
| - | * Open certificate by double-clicking or right-click and " | + | * Browse to certificate |
| - | * Details | + | * Open certificate by double-clicking or right-click and " |
| - | * Export to file | + | * Details |
| - | * (*) No, don't export private key | + | * Export to file |
| - | * (*) Base-64 encoded X.509 (.CER) | + | * (*) No, don't export private key |
| - | * Run: '' | + | * (*) Base-64 encoded X.509 (.CER) |
| - | * Run: '' | + | * Run: '' |
| - | * The SSH key is displayed | + | * Run: '' |
| + | * The SSH key is displayed | ||
| + | * Using PuTTY-CAC | ||
| + | * Open PuTTY-CAC | ||
| + | * Connection > SSH > Certificate > Set CAPI Cert... | ||
| + | * Certificate string for authorized keys file: Copy to Clipboard | ||
| + | ===== Using Pageant with SSH in Cygwin and MinGW ===== | ||
| - | ===== Using Pageant with SSH in Cygwin | + | * Get ssh-pageant.exe from [[https:// |
| + | * Cygwin | ||
| + | * Install | ||
| + | * $ cp ssh-pageant.exe /usr/bin/ | ||
| + | * $ chmod 755 / | ||
| + | * Run ssh-pageant: | ||
| + | * Automatically run ssh-pageant: | ||
| + | * Alternatively, | ||
| + | * MinGW | ||
| + | * $ eval $(< | ||
| - | * Get ssh-pageant.exe from [[https:// | + | ===== Using a Proxy with SSH in Cygwin |
| - | * Install | + | |
| - | * $ cp ssh-pageant.exe /usr/bin/ | + | |
| - | * $ chmod 755 / | + | * '' |
| - | * Run ssh-pageant: $ eval $(/ | + | * ncat is part of [[https://nmap.org/|nmap]] |
| - | * Automatically run ssh-pageant: Add the eval command to ~/.bashrc or ~/ | + | |
| - | * Alternatively, | + | |
| Line 67: | Line 94: | ||
| * '' | * '' | ||
| * Use a different known hosts file when creating multiple tunnels: '' | * Use a different known hosts file when creating multiple tunnels: '' | ||
| + | * SSH into remote-user@remote-host behind jump-user@jump-server: | ||
| + | |||
| + | SSH config with jump server: | ||
| + | < | ||
| + | # SSH into remote-user@remote-host behind jump-user@jump-server | ||
| + | Host my-remote | ||
| + | ForwardAgend yes | ||
| + | Hostname remote-host | ||
| + | User remote-user | ||
| + | ProxyJump jump-user@jump-server | ||
| + | </ | ||
infrastructure/ssh.1529406073.txt.gz · Last modified: (external edit)
