If you open a shell link in mc (midnight commander) (F9 → Right → Shell link, for example), it'll use a program called fish, which uses port 22 by default, which is of course useless if the ssh server at the other end is using a different port.

An easy way to fix this:

edit (or create) your ~/.ssh/config

add a few lines like this:Host <name>Hostname <hostname or IP>Port <port>HostKeyAlias <name>

In my case, I have a "media server" on my local network, which is running sshd on port 1235:Host mediaHostname 192.168.1.68Port 1235HostKeyAlias media

Now, when mc asks for the machine name, I can just type "media"

It is possible that in later versions of mc this issue has been fixed (I'm running 4.6.1a on Fedora 8).

Send me your comments!

Something didn't work as expected?
You'd like to add some useful info to this tip?
Use the form below to send me your comments.
(Don't forget to fill out the super-lame CAPTCHA below..)