Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see:
viewtopic.php?t=158230
If none of the specific sub-forums seem right for your thread, ask here.
kmchen
Posts: 74 Joined: 2013-04-24 06:29
#1
Post
by kmchen » 2018-03-06 17:03
Hi,
I have all SSH keys in places and I can do scp from a remote host to my local machine like this:
But I get error "Host key verification failed" if I want to copy on the same remote host like this:
Code: Select all
scp root@remoteHost:file root@remoteHost:/tmp/
I precise I need that curious looking command for a modular script writing
Any idea welcome
peter_irich
Posts: 1403 Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times
#2
Post
by peter_irich » 2018-03-06 17:43
Not use root for SSH. Send file as user to user, then turn on as user by SSH and copy this file on remote computer as root.
Peter.
reinob
Posts: 1189 Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times
#3
Post
by reinob » 2018-03-07 18:43
kmchen wrote:
But I get error "Host key verification failed" if I want to copy on the same remote host like this:
Code: Select all
scp root@remoteHost:file root@remoteHost:/tmp/
Login to root@remoteHost, then edit .ssh/known_hosts and delete the line referring to remoteHost.
You (or somebody on your behalf :) probably changed the host keys at some point.
Dai_trying
Posts: 1100 Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times
#4
Post
by Dai_trying » 2018-03-08 08:36
I would just issue the command using ssh, something like this
Code: Select all
ssh user@ipaddress "mv ~/tempfile.txt /tmp/"
Not sure it would work with root though but I guess if you ssh in as root (and have root login enabled) then I can't see it being a problem.