-
Hi, so I was looking for a way to configure windows terminal to have a profile that automatically logins to a remote server using mosh.
-
I ended up here, but it wasn't a reliable method for me.
-
Below is how I managed to do it.
-
First make sure the requirements are present,
WSL
,Windows Terminal
andan installed distribution of your choice
( preferably Ubuntu). -
Next proceed; installing mosh and ssh in the wsl distribution of your choice.
-
Next create an SSH Key that is not password protected and then add it to your remote server.
-
Also do remember to install
mosh
in the remote server. -
Next within your wsl distribution, create the
~/.ssh/config
file and then add the following;HostName RemoteServer HostName `$remote_ip` User `$remote_username` IdentityFile ~/path/to/private/key/file
-
Restart SSH.
-
Test the connection from terminal;
mosh RemoteSerer
-
If it works add the following line to the windows terminal config file;
"commandline": "wsl -d Ubuntu-20.04 mosh RemoteServer",
- Now you are good to go.
Last active
November 14, 2024 17:59
-
-
Save iAmG-r00t/31137842e8923e6fdedff9a460401243 to your computer and use it in GitHub Desktop.
Windows Terminal + WSL + MOSH + Remote Server == SSH Tab Profile in Windows Terminal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No need.