-
Notifications
You must be signed in to change notification settings - Fork 2
SSH
William Zhang edited this page Jan 15, 2019
·
2 revisions
- ssh to destination server through jump server in one session of WSL.
- create tunnel in another session of WSL.
$ ssh -NL 127.0.0.1:8000:remote:8000 -p 22 public@jump public@jump's password:
Local 8000 is now mapped to destination server’s 8000.
Make sure it is the correct distribution and version wanted. (CentOS 7.x, Ubuntu 18.04, etc.)
If the default ssh port is not 22, so make sure to access it with:
$ ssh -p <port> user@host $ scp -P <port> from@host1:/foo user@host2:/baro
Look the case of the letter p/P!
https://www.cyberciti.biz/faq/how-to-fix-x11-forwarding-request-failed-on-channel-0/
- WSL Linux
Local /etc/ssh/ssh_config.
19 Host * 20 ForwardAgent yes 21 ForwardX11 yes 22 ForwardX11Trusted yes ... 49 SendEnv LANG LC_* 50 HashKnownHosts yes 51 GSSAPIAuthentication yes 52 XauthLocation /usr/bin/xauth
- SSH Server
Remote /etc/ssh/sshd_config.
X11Forwarding yes X11UseLocalhost no # service sshd reload
- Debug
$ ssh -X -v -v -v user@ip
Install OpenSSL and register it as an automatic task in Windows, https://www.illuminiastudios.com/dev-diaries/ssh-on-windows-subsystem-for-linux/.
Created by Wenliang Zhang.