Skip to content

mosh with wireguard

[SOLVED...maybe?] see replies.

Merry Christmas everyone!

I've been experimenting with wireguard and everything seems to be working correctly....everything except mosh. When I try to connect to my VPS that is connected to a mullvad VPN via wireguard I get the following error:

mosh: Nothing received from server on UDP port 60001.

Changing the UDP port doesn't seem to solve the problem. I have port forwarding setup on mullvad so I can ssh into that VPS no problem. Any help would be sincerely appreciated!

BTW, wireguard + mullvad is a great combination.

Edited 27 Dec 2017. We only hold this version.

6 points12 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
6 · 100% up
Kind
Text
ID
7masde

Author

51
posts
245
comments
1
media
View profile

13 comments

Try mosh --bind-server=any user@host

Possibly related: https://github.com/mobile-shell/mosh/issues/374

2 points

Thanks for the reply, unfortunately your suggestion did not seem to help. But, I think I solved it. In the past I've been running mosh like this:

mosh my_vps

where my_vps is a host in my ~/.ssh/config file. When my VPS is running wireguard this did not work and returned the error I mentioned originally. The solution appears to be:

mosh -p xxx my_vps

where xxx matches the port number in the ~/.ssh/config file

1 points

If you're specifying the SSH port, you should be using mosh --ssh="ssh -p xxx" your_vps. Using mosh -p xxx your_vps is specifying the mosh UDP port instead.

1 points

Slightly unrelated, but wireguard plays very nicely with pass password manager. Just replace your PrivateKey under [Interface] in your config file with:

PostUp = wg set %i private-key <(pass WireGuard/private-keys/%i)

Really cool, I think :)

1 points

How would this work with a user since root is required? Care to expand the archwiki entry maybe :)?

1 points

Yes, I can definitely do that. However, I'm not very familiar with the archwiki etiquette. By that I mean, is it appropriate to include entries in the archwiki that are essentially straight out of the man pages? I ask because this command is straight out of the wg-quick man page :S

1 points

My bad, the code in my original post won't work. Here's the correct code:

PostUp = wg set %i private-key <(su user -c "export PASSWORD_STORE_DIR=/path/to/your/store/; pass WireGuard/private-keys/%i")

just replace user with your username

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.