scp - copy between two remote machines?


 
Thread Tools Search this Thread
Operating Systems Solaris scp - copy between two remote machines?
# 1  
Old 02-04-2007
scp - copy between two remote machines?

1. scp person1@10.10.10.1:file1 person2@10.10.10.2:file1
2. scp file1 person1@10.10.10.1:file1

For #1, I keep getting this error:
Password:
Host key verification failed.
lost connection

I have entered the correct password too!

#2 works fine. I suppose I cannot copy a file between two remote machines?
# 2  
Old 02-04-2007
why dont you do this

SSH=/usr/local/bin/ssh
$SSH person1@10.10.10.1 scp /location/file1 person2@10.10.10.2:/location/file1
# 3  
Old 02-04-2007
Quote:
Originally Posted by Create
why dont you do this

SSH=/usr/local/bin/ssh
$SSH person1@10.10.10.1 scp /location/file1 person2@10.10.10.2:/location/file1
Password:
Host key verification failed.
lost connection


Same problem. I suppose you can't copy files between two remote machines but you only copy files between a local machine and a remote machine?
# 4  
Old 02-04-2007
scp from remote systems is possible..
Code:
syst1# scp syst2:/tmp/tst123 syst3:/tmp/tst1234
syst1# ssh syst2 ls -al /tmp/tst123
-rw-r--r--   1 root     root          23 Feb  5 13:22 /tmp/tst123
syst1# ssh syst3 ls -al /tmp/tst1234
-rw-r--r--   1 root     root          23 Feb  5 13:29 /tmp/tst1234
syst1#

In this example the user is able to ssh to the servers without a password.

I tried with 2 different users and I got a different error to yours.
Code:
syst1# scp user1@syst2:/tmp/tst123 user2@syst3:/tmp/tst12345
Password:
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive).
lost connection
syst1#

I have verified that the passwords are correct for both users via an ssh connection.

Last edited by Tornado; 02-04-2007 at 11:13 PM..
Tornado
# 5  
Old 02-04-2007
Does the following work fine, without any error ?
Code:
ssh person1@10.10.10.1
ssh person2@10.10.10.2

I have found that if the user can ssh without being prompted for a password it will work fine.
Tornado
# 6  
Old 02-04-2007
[QUOTE=Tornado]scp from remote systems is possible..
Code:
syst1# scp syst2:/tmp/tst123 syst3:/tmp/tst1234
syst1# ssh syst2 ls -al /tmp/tst123
-rw-r--r--   1 root     root          23 Feb  5 13:22 /tmp/tst123
syst1# ssh syst3 ls -al /tmp/tst1234
-rw-r--r--   1 root     root          23 Feb  5 13:29 /tmp/tst1234
syst1#

In this example the user is able to ssh to the servers without a password.

QUOTE]

For this example, do you have .rhosts files and/or hosts.equiv configured? Maybe that's why it worked between two remote file systems without providing passwords?

So your last example didn't work? I had that error too. It's weird sometimes I get that error.

So how exactly do I use scp between two remote file systems by providing the passwords?
# 7  
Old 02-04-2007
.rhosts is for rsh not for ssh
Tornado
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

scp auto logon to remote using remote authorized_keys

Hi~ i have an authorized key which it made remote host(B). i want log on without password from local(A) to the remote host(B) using authorized key of remote host. what shell i do? anybody help me. (1 Reply)
Discussion started by: tomato00
1 Replies

2. UNIX for Dummies Questions & Answers

Running commands on remote machines

so i want to monitor a variety of things on hundreds of servers. the old process was to have an agent running on each one of these servers. but now i'm looking to see if its possible to have agentless monitoring. the only other straight forward option other than having an agent on the hosts, is... (2 Replies)
Discussion started by: SkySmart
2 Replies

3. UNIX for Advanced & Expert Users

Secure Copy, scp

Is there a way we can avoid asking of password when we transfer file from one Unix server to another server using SCP command. Or Is is possible that the batch file in unix in which I am giving the SCP command takes the password and transfer the files automatically without me typing the... (1 Reply)
Discussion started by: Pash
1 Replies

4. Solaris

scp from remote dir

Hi Admins, I want to scp some files from remote sub directories.So i used below scripts to accomplish the same. find `ssh testsftp@10.60.5.120/QSYS.LIB/EDWVPINTER.LIB` -name *.MBR -exec scp {} . \; It fails. I can not place copying script in remote server for various reasons. ... (1 Reply)
Discussion started by: newaix
1 Replies

5. UNIX for Dummies Questions & Answers

directory copy with scp

I need to copy all files and directories with scp, but seems I am missing something? /usr/bin/scp -p /custscripts/* rmprod2:/custscripts doesn't copy directories and files under them. Please advise. (1 Reply)
Discussion started by: Daniel Gate
1 Replies

6. Shell Programming and Scripting

Trying to copy Using scp facing problem

source file is located in (elk.some.com) /export/elk2/vp141p/Somedir/dist/current/Filename.ear destination machine(191.hydc.xxx.com) /export/home/vp141p/ARCHIVE scp -p vp141p@hstst191.hydc.sbc.com:/export/elk2/vp141p/PM_Build_SBS/Build_PVT_SBS/dist/current/Filename.ear . The above code is... (5 Replies)
Discussion started by: vishwakar
5 Replies

7. Shell Programming and Scripting

how to ssh to remote unix machines using private/public key

hello, iam able to ssh to a linux server from a linux server called "machine1" using the private/public key method, so I dont need to enter any password when I run my script but iam not able to ssh from machine1 to a UNIX server, access is denied. note that I am using an application id which is... (6 Replies)
Discussion started by: wydadi
6 Replies

8. UNIX for Dummies Questions & Answers

Copying files to different linux machines using scp

Hi alll i had a file authorized_keys on machine one. now i need to copy this authorized keys file into machine2,machine 3..... i use scp authorized_keys root@192.168.168.11:/tmp/ for copying file . is there ant way to copy the same filr to multiple machines at one go ... (1 Reply)
Discussion started by: kalyankalyan
1 Replies

9. Shell Programming and Scripting

SCP copy

I want to copy all the files and subdirectory from a server. I tried scp pritish@ipaddress:/home/pritish -r $PWD it copies all the files but not the directory, Can any one help me. I want to copy files as well as subdirectory from a server directory Note: Use CODE-tags when... (2 Replies)
Discussion started by: pritish.sas
2 Replies

10. UNIX for Advanced & Expert Users

How do I check file dates on remote machines

Hi .. I want to check the date for one file which is present on the remote machine. How do i do that?? Also if i'm only having the sudo rights .. can i do that with my login or do i need all the access rights?? Please let me know asap. (3 Replies)
Discussion started by: decci_7
3 Replies
Login or Register to Ask a Question