linux

MidnightCommander doesn’t support ssh connection to non-default port

I think that midnight commander(mc) is the simplest and robust file manager for terminal but this simplicity has a price that should be paid by cutting some features which are often faced linux terminal users.
I guess, everyone faced the problem when you need to connect via ssh over non-default port (22). The problem is that mc doesn’t have option to for port connection that is why we should go other way.

The one of solution for this occasion , that works for me perfectly, is

  • go to ~/.ssh/
  • use or create new “config” file
  • add

    host somename
    user username
    hostname somename.com (or IP)
    port 2222

  • go to mc and make a connection by using value (e.g. somename)

Leave a comment