infrastructure:ssh
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| infrastructure:ssh [2018-05-15 14:57] – created mrks | infrastructure:ssh [2021-01-26 21:23] (current) – mrks | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SSH ====== | ====== SSH ====== | ||
| - | ===== SSH on Windows with smartcard authentication | + | ===== Use SSH keys ===== |
| - | - Install Kitty http:// | + | In case there is no '' |
| - | - Import the certificate | + | |
| - | - Run kageant.exe | + | |
| - | - Right click kageant tray icon | + | |
| - | - Add certificate | + | |
| - | - Choose certificate | + | |
| - | - Login using smartcard authentication | + | |
| - | - Ensure that kageant.exe | + | |
| - | - Run Kitty | + | |
| - | - Connection | SSH | Auth | [x] Attempt authencation using Pageant | + | |
| - | - Optionally disable " | + | |
| - | - Optionally enable "Allow agent forwarding" | + | |
| + | * '' | ||
| + | * '' | ||
| + | * Paste the public key to the file | ||
| - | ===== Converting X509 certificate to SSH public key ===== | + | Set the permissions for the '' |
| - | | + | |
| - | - certmgr.msc | + | * '' |
| - | | + | |
| - | | + | |
| - | - Details | + | ===== SSH and SCP on Windows |
| - | - Export | + | |
| - | - (*) No, don't export private key | + | * Get pageant from [[https:// |
| - | | + | * Import a smartcart certificate |
| - | | + | * Run pageant.exe |
| - | | + | * Right click pageant try icon |
| + | * Add CAPI cert | ||
| + | * Choose certificate | ||
| + | * Automatically import a smartcard certificate: | ||
| + | * Get fingerprint from certificate | ||
| + | * '' | ||
| + | | ||
| + | | ||
| + | * " | ||
| + | * Copy fingerprint and remove the spaces | ||
| + | | ||
| + | * PuTTY using smartcard authentication | ||
| + | * Ensure that pageant.exe is still running in the system tray | ||
| + | * Run Putty | ||
| + | * Connection | SSH | Auth | [x] Attempt authencation using Pageant | ||
| + | * Optionally disable " | ||
| + | | ||
| + | * PLink using smartcard authentication | ||
| + | * Ensure that pageant.exe is still running in the system tray | ||
| + | * '' | ||
| + | * Optioanlly use '' | ||
| + | * WinSCP using smartcard authentication: | ||
| + | * Ensure that pageant.exe is still running in the system tray | ||
| + | * Advanced settings | SSH | Authentication | [x] Try authentation using Pageant | ||
| + | * Optionally disable " | ||
| + | |||
| + | |||
| + | ===== Converting CAPI X509 certificate to SSH public key ===== | ||
| + | |||
| + | * Using OpenSSL | ||
| + | | ||
| + | * certmgr.msc | ||
| + | * Browse to certificate | ||
| + | * Open certificate by double-clicking or right-click and " | ||
| + | * Details | ||
| + | * Export to file | ||
| + | * (*) No, don't export private key | ||
| + | | ||
| + | * Run: '' | ||
| + | * 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 ===== | ||
| + | |||
| + | |||
| + | * Get ssh-pageant.exe from [[https:// | ||
| + | * Cygwin | ||
| + | * Install in Cygwin (do not copy paste the file via Windows Explorer) | ||
| + | * $ cp ssh-pageant.exe /usr/bin/ | ||
| + | * $ chmod 755 / | ||
| + | * Run ssh-pageant: | ||
| + | * Automatically run ssh-pageant: | ||
| + | * Alternatively, | ||
| + | * MinGW | ||
| + | * $ eval $(< | ||
| + | |||
| + | |||
| + | ===== Using a Proxy with SSH in Cygwin and MinGW ===== | ||
| + | |||
| + | |||
| + | * '' | ||
| + | * ncat is part of [[https:// | ||
| + | |||
| + | |||
| + | ===== SSH Tunneling ===== | ||
| + | |||
| + | |||
| + | * Create an SSH tunnel from localhost: | ||
| + | * '' | ||
| + | * '' | ||
| + | * 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.1526389038.txt.gz · Last modified: (external edit)
