Kroko Just another WordPress weblog

July 2, 2018

Using FTP usernames with @ – symbol in midnight commander

Filed under: Linux — admin @ 11:59 am

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.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Powered by WordPress