Using FTP usernames with @ – symbol in midnight commander

MC is a console file manager. It supports FTP connections, and is a great alternative to classic ftp client.

However, the default FTP connection format string [username[:password]@]hostname has a drawback of not allowing the use of usernames with ‘@’-symbol in them – which is very common.

One of the solutions is to create a .netrc file with following content(replace all-caps words with your actual credentials)

machine HOSTNAME login USER@HOSTNAME password PASSWORD

or if you want to ask for password every time:

machine HOSTNAME login USER@HOSTNAME

Now, start MC, choose FTP connect, and enter only the hostname. This will also work for console ftp clients like lftp.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.