scp from remote dir


 
Thread Tools Search this Thread
Operating Systems Solaris scp from remote dir
# 1  
Old 01-30-2012
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.

Code:
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.

Please suggest.

Regards
newsol

---------- Post updated at 01:07 AM ---------- Previous update was at 01:06 AM ----------

HI admins,

Added, I am also trying to use sftp to copy files.But mget not works as expected.

Regards
newsol
# 2  
Old 01-30-2012
Hi Admins,

Please find the command

Code:
ssh -v testsftp@10.60.5.120 find /QSYS.LIB/EDWVPINTER.LIB -name *.MBR

It works. But below command command doesnot work.

Code:
ssh -v testsftp@10.60.5.120 find /QSYS.LIB/EDWVPINTER.LIB -name *.MBR -exec scp sftpuser@10.50.23.81:/export/sftpuser {} \;

Please suggest.

Regards
newsol
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. Shell Programming and Scripting

Check if remote destination is available before running scp command

I have a script on a Linux box which scp the files to windows server without any issues. but there are time frames where the windows server will not be available due to maintenance. hence I need to check if the remote location is available before running the scp command. scp... (3 Replies)
Discussion started by: gpk_newbie
3 Replies

3. UNIX for Beginners Questions & Answers

scp of multiple files to remote server

Hello, I would like to scp multiple files to a remote server that requires a password for the process to be completed. I have 30 folders (x_1, x_2 ... x_30), each containing 25 files. What I want to do is scp 1 out of the 25 files (file called bvals) for all my folders to a remote server and... (3 Replies)
Discussion started by: nasia.m
3 Replies

4. UNIX for Beginners Questions & Answers

How to test if remote dir exist?

Hello, :) I'm trying to test if a remote directory exist per ssh, I have already made a ssh key and it works : #!/bin/bash HOST="10.10.1.22" FILE_PATH="/var/wwww/html" ssh -q $HOST ] && echo "Directory exists" || echo "Directory does not exist"; Output : ... (4 Replies)
Discussion started by: Arnaudh78
4 Replies

5. Shell Programming and Scripting

scp and append to a remote node

I have multiple nodes and combine the files with the same name into one single file. Is there a way to scp or something else and combine them? I tried this, but not working.... /usr/bin/scp /usr/local/system/scripts/myout.txt >> ahcaxdbmil1c:/usr/local/system/scripts/myout.txt Please... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

6. Shell Programming and Scripting

scp files that are 3 days older from remote server-

hello, i am trying to get a list of files to be scped from the remote server by running the below in my local unix server ( note - there is a passwordless connectivity setup made between the local and remote server) and, we use KSH. --- ssh $scp_host "find /a/b/c/*/ -iname "$remote_file"" >... (4 Replies)
Discussion started by: billpeter3010
4 Replies

7. Shell Programming and Scripting

scp or rsync multiple files in parallel from a remote host

Hi. I'm trying to speed up an rsync command by running it in parallel. There's no real option for this other than if the files are in multiple directories (which they're not). And even then there's no way of knowing if rsync has succeeded as the process is running in the background .. and... (4 Replies)
Discussion started by: Big_Jeffrey
4 Replies

8. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

9. Solaris

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... (6 Replies)
Discussion started by: kungpow
6 Replies

10. Shell Programming and Scripting

To get the dir list of a remote server

Dear all; I am new to UNIX scripting and I want to download remote server's dir listing every hour, to check whether it is updating. How can I do this. can I use ftp command to down load this dir listing. Pls help me in this regards. tks (1 Reply)
Discussion started by: HMS.Chandrasiri
1 Replies
Login or Register to Ask a Question