Centos FTP from command line

Discussion in 'Installation/Configuration' started by Polk, Aug 14, 2010.

  1. Polk

    Polk New Member HowtoForge Supporter

    Hi,

    How can I upload 1 file into FTP of a different server via command line?
    Is this possible?

    For example, I have a file /root/file.tar.gz
    From Command line, I need to connect to some other server via FTP and authentication, and upload this file.tar.gz to there.

    Similar as we download using wget, but I need to upload.

    Thanks.
     
    Last edited: Aug 14, 2010
  2. falko

    falko Super Moderator ISPConfig Developer

    You could do this with scp (more secure than FTP).

    Code:
    scp /path/to/file user@server1.example.com:/path/to/directory
     
  3. Polk

    Polk New Member HowtoForge Supporter

    Is scp connecting to FTP protocol? Where do I enter password?
    I tried the command, but it just sits there and not doing anything.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    It uses SSH, so make sure SSH is running on the remote server (on port 22), and that the user is allowed to log in using SSH.
     

Share This Page