How to Copy Files Between Servers via SSH Using Midnight Commander

By | July 10, 2008

If you are a system administrator, you should often need to copy files between servers. I think that the most useful tools for this is Midnight Commander (mc). I will show you how to establish a SSH connection to another server in this post.

First of all let’s start midnight commander from command line by typing mc. If you don’t have it installed you should run yum install mc to get it. I will continue with Windows screenshots, though it is much better to run it in Linux. Here is its main window:

midnight commander main interface

We need to establish an SSH connection to Another server in order to do this. Let’s go to Right-Shell link as shown on the screenshot below:

midnight commander create shell link

We will be shown a window prompting for machine name. Just type in the hostname or IP address of another Linux box if you will be logging in as root or type username@IP if you will log in as another user, just like at the screen.

mc login prompt

After you hit return, you will most probably be prompted that the authenticity of the host you’re trying to connect to cannot be established. Answer yes to the question that appears: Are you sure you want to continue connecting? Just type yes in the command line (on Windows mc interface is messed up when you’re trying to connect, but I hope you’ll find where to type it).

Then mc will ask you for a password. Just enter it and you are in! The next screen that should appear is one with two mc panels: one local and one remote. You can do anything you want with remote files as they were local. That’s why I consider this method the most useful for copying files between Linux boxes: it is fast and visual: you can see everything that’s happening.

2 thoughts on “How to Copy Files Between Servers via SSH Using Midnight Commander

  1. Daniel

    Hi!
    I’m long ago try to solve this talk, found your post here and SO SORRY all images here not visible! Can you correct it? PLS!

    1. admin Post author

      Fixed. Thank you for letting us know about the issue.

Comments are closed.