SSH tricks

 · Jean Schurger
Table of contents

SSH through an http proxy

(ncat comming from package nmap or ncat)

ProxyCommand /usr/bin/ncat --proxy-type http --proxy PROXY:PORT --proxy-auth PROXY_USER:PROXY_PASSWORD %h 22

SSH through an SSH hop

ProxyCommand /usr/bin/ssh USER@HOP /bin/nc %h 22

Keeping an agent in WSL

keychain does the trick

keychain -q --nogui $HOME/.ssh/key_to_add
source $HOME/.keychain/$(hostname)-sh

Using the Windows ssh-agent

Running Windows PowerShell as administrator

Get-Service -Name ssh-agent | Set-Service -StartupType Manual

Using Emacs TRAMP on Windows 10

Use /sshx: in place of /ssh: