Linux tip, Fedora tip / howto: Using an mc shell (ssh) link over a different port

 
Note that these tips are mostly outdated


back to notes and tips index

Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.

Using an mc shell (ssh) link over a different port

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 media
    Hostname 192.168.1.68
    Port 1235
    HostKeyAlias 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).


← back to notes and tips index
Please do not copy the text of this tip (© Patrick Min) to your web site.