Changing the sshd listening port on Portable Ubuntu

I run Windows mainly and have been trying out Portable Ubuntu a bit. I currently use cygwin for bash, sshd, and some other things.

Portable Ubuntu doesn’t play nice with claiming listening rights over port 22 when starting up, so once it’s running, I can’t connect to either ssh server.

I wanted to throw the Portable Ubuntu listening port to something else, so I edited /etc/ssh/sshd_config and changed Port to 22. That wasn’t enough, apparently, because the whole VM is behind some kind of NAT-based emulation.

You have to edit <your pubuntu dir under windows>/config/portable_ubuntu.conf too. There’s a configuration line specifically for listening on port 22, and it looks like this:


I presume the two “22”s stand for port mapping on each end (similar to a router). I didn’t figure out which was which, but I changed both ends to what I set in /etc/ssh/sshd_config and now it’s working properly.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: