Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How to connect through sftp to a non-standard port on Midnight Commander?

In Midnight Commander one can make an SFTP connection to a remote machine using:
cd #sh:yourusername@example.com:/home/username/


How can this be done when the remote machine is using a non-standard port?
by

1 Answer

Bharatgxwzm
Whenever you want to use non-default settings for ssh, define an alias in ~/.ssh/config. This way you can ssh myalias, or have some application call ssh myalias under the hood, without having to worry as to how you're going to pass settings such as a non-default port, a different user name and so on.
Host foo
HostName example.com
Port 2222
User yourusername


Then in Midnight Commander: cd #sh:foo:

Login / Signup to Answer the Question.