OPERATING SYSTEMSOS Linux

Ubuntu/WSL SSH Server Setup Guide | Remote SSH WSL

Want to remote control your Ubuntu WSL, or just access it abroad or over the network? Assuming it’s been started, the OpenSSH server I’ll show you how to set up and configure in this video should be automatically stated as well, meaning you can connect to it and control your Ubuntu WSL from abroad!

Port Forwarding Ubuntu WSL Guide: https://youtu.be/6XIewWXXSNs

Using the above, you can port forward the port you used and access it over the internet! I would recommend setting key based authentication and disabling password authentication first!!

Change port on 22.10+:
sudo mkdir -p /etc/systemd/system/ssh.socket.d

[Socket]
ListenStream=
ListenStream=2200

sudo systemctl daemon-reload
sudo systemctl restart ssh

Timestamps:
0:00 – Intro/Explanation
0:36 – Install OpenSSH server
0:58 – Customize options for OpenSSH server
1:10 – Enable SSH on WSL startup (systemd)
2:16 – Allow OpenSSH through the firewall
2:39 – Changing SSH port & Config
3:02 – Change SSH port on Ubuntu 22.10+
3:36 – Testing SSH on Ubuntu WSL boot
3:54 – Connecting to Ubuntu WSL SSH

#Ubuntu #WSL #SSH
—————————–
💸 Found this useful? Help me make more! Support me by becoming a member: https://youtube.com/channel/UCkih2oVTbXPEpVwE-U7kmHw/join
—————————–
💸 Direct donations via Ko-Fi: https://ko-fi.com/TCNOco
💬 Discuss the video & Suggest (Discord): https://s.tcno.co/Discord
👉 Game guides & Simple tips: https://YouTube.com/TroubleChuteBasics
🌐 Website: https://tcno.co
📧 Need voiceovers done? Business query? Contact my business email: TroubleChute (at) tcno.co

Everything in this video is my personal opinion and experience and should not be considered professional advice. Always do your own research and ensure what you’re doing is safe.

source

ubuntu

8 thoughts on “Ubuntu/WSL SSH Server Setup Guide | Remote SSH WSL

  • Ahh I was trying to minutes until I realized that I also need the port forwarding you linked in your description. Thank you so much!

  • Does the SSH have to change port out of 22? Is it because the default 22 port is being used for the WSL communication to the windows command prompt?

  • Wonderful tutorial! Although took me a lot of tries and a lot of because I have low attention span.

  • New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd) for WSL' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 1156

  • If you are going to use SSH I would recommend creating ssh keys

Comments are closed.