Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: OT: How to copy a remote file to local system through SCP ?

by u65 (Chaplain)
on Oct 13, 2015 at 22:42 UTC ( #1144774=note: print w/replies, xml ) Need Help??


in reply to OT: How to copy a remote file to local system through SCP ?

Welcome, nayaksan!

The solution to your problem, as I understand it, does not require Perl and you can do several things to solve it. However, if you are a limited sudoer on the remote host, you may not be able to solve the problem at all if you can't copy the file owned by wsl to someplace you as user id can access it.

Here is what seems the easiest way to me: log on to the remote host, then do whatever it takes to copy the desired file to your home directory there. If and only if that is possible: back on the local host, execute:

$ scp id@remotehost:filename.suf . # <= note the dot (period)

and the system should ask for your password and the copy should work.

Hope that helps.

-Tom

Update: I think salva has pointed you in the right direction.

Replies are listed 'Best First'.
Re^2: OT: How to copy a remote file to local system through SCP ?
by nayaksan (Initiate) on Oct 14, 2015 at 05:50 UTC

    Hi Tom,

    Thanks for suggestion. In that way, i can copy the remote files to my system. But is there any way so that i can directly copy the files owned by "wls" user to my local system, as i am doing some automation scripts for testing.

    Regards,

    Sanjay

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1144774]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2021-05-10 07:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (105 votes). Check out past polls.

    Notices?