October 23rd, 2013, 09:34 PM
Copying files from Ubuntu (cloud) to CentOs (dedicated)
This works fine (from Laptop to Ubuntu):
From laptop to centOs also works fine:
scp -r /Applications/XAMPP/xamppfiles/htdocs/ci email@example.com:"/var/www/vhosts/ben.s.com"
But from Ubuntu to centOs:
scp -r /Applications/XAMPP/xamppfiles/htdocs/ci firstname.lastname@example.org:"/var/www/vhosts/ben.s.com"
sftp -r email@example.com:"/var/www/vhosts/ben.flatmatescentre.com" firstname.lastname@example.org:"/home/h2g/delete_this"
And when I type password I get:
Host key verification failed.
1 - What am I doing wrong?
2 - I am also curious to know more about the considerable difference between scp and sftp.
November 4th, 2013, 08:53 PM
Originally Posted by English Breakfast Tea
November 4th, 2013, 09:17 PM
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:
Just to see if it logs in successfully. If so, then try:
<enter password and log in>
and go through the same steps, but instead of typing "ls", do a "get *" and see if that works for you.
sftp -r email@example.com
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