Quantcast
Channel: Autarchy of the Private Cave » how-to
Viewing all articles
Browse latest Browse all 35

Using FTP usernames with @-symbol in midnight commander

$
0
0

MC is a console file manager. It supports FTP connections, and in my experience is faster in FTP than both Krusader and Gnome Commander.

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 for virtual hostings.

One of the solutions is (done in your home directory):

  1. if there is no .netrc file in your home directory — touch .netrc && chmod 600 .netrc
  2. mcedit .netrc (or use vi, nano, or any other editor you prefer)
  3. add the following line to the file (replace all-caps words with your actual credentials): machine HOSTNAME login USER@HOSTNAME password PASSWORD

Now, start MC, choose FTP connect, and enter only the hostname. You will be automatically logged in to the remote FTP.
This will also work for console ftp clients like lftp.

Share


Viewing all articles
Browse latest Browse all 35

Trending Articles