#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171

    Copying files from Ubuntu (cloud) to CentOs (dedicated)


    Hi;

    This works fine (from Laptop to Ubuntu):
    Code:
    scp -r /Applications/XAMPP/xamppfiles/htdocs/ci root@129.9.12.203:"/var/www/vhosts/ben.s.com"
    From laptop to centOs also works fine:
    Code:
    scp -r /Applications/XAMPP/xamppfiles/htdocs/ci root@111.4.62.51:"/var/www/vhosts/ben.s.com"
    But from Ubuntu to centOs:
    Code:
    sftp -r root@129.9.12.203:"/var/www/vhosts/ben.flatmatescentre.com" root@111.4.62.51:"/home/h2g/delete_this"
    root@129.9.12.203's password:

    And when I type password I get:

    Host key verification failed.
    lost connection

    1 - What am I doing wrong?

    2 - I am also curious to know more about the considerable difference between scp and sftp.

    Thank you
  2. #2
  3. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    Originally Posted by English Breakfast Tea
    Hi;

    This works fine (from Laptop to Ubuntu):
    Code:
    scp -r /Applications/XAMPP/xamppfiles/htdocs/ci root@129.9.12.203:"/var/www/vhosts/ben.s.com"
    From laptop to centOs also works fine:
    Code:
    scp -r /Applications/XAMPP/xamppfiles/htdocs/ci root@111.4.62.51:"/var/www/vhosts/ben.s.com"
    But from Ubuntu to centOs:
    Code:
    sftp -r root@129.9.12.203:"/var/www/vhosts/ben.flatmatescentre.com" root@111.4.62.51:"/home/h2g/delete_this"
    root@129.9.12.203's password:

    And when I type password I get:

    Host key verification failed.
    lost connection

    1 - What am I doing wrong?

    2 - I am also curious to know more about the considerable difference between scp and sftp.

    Thank you
    Anyone?
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    I personally prefer using sftp over scp, mainly because I can chdir into directories, do an ls and do a get * as needed. However, there is no real difference at the lower levels, as both use the ssh protocol to actually get the job done.

    With that said, I've never seen anyone use sftp to copy from one server into a third host like you did (I don't think it even allows that).

    With that said, your error message is interesting. Try the interactive mode instead:
    Code:
    sftp root@129.9.12.203
    <enter password and log in>
    cd /var/www/vhosts/ben.flatmatescentre.com
    ls
    exit
    Just to see if it logs in successfully. If so, then try:
    Code:
    sftp -r root@129.9.12.203
    and go through the same steps, but instead of typing "ls", do a "get *" and see if that works for you.

    Please report back if you see anything different or it doesn't work for you.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo