LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-02-2004, 07:36 AM   #1
mehlkelm
Member
 
Registered: Apr 2003
Location: Basel, Switzerland
Distribution: Ubuntu, OS X
Posts: 77

Rep: Reputation: 15
Question copy from remote with ssh


Hi all,

I dont use SSH a lot, so I got this basic theoretical question:

I can copy files from remote to local machine with scp - that I know. But after loggin into the remote system with ssh, how can I copy files to local system with an scp command from there? Without knowing my ip adress?

Stefan
 
Old 09-02-2004, 07:50 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 47
from your local system, assuming it is linux too

scp userid@remotesystem:/path/to/files .

will copy the files directly to your local disk

if you are using windows, you can use pscp (Putty) instead of scp.
 
Old 09-02-2004, 07:57 AM   #3
mehlkelm
Member
 
Registered: Apr 2003
Location: Basel, Switzerland
Distribution: Ubuntu, OS X
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
scp userid@remotesystem:/path/to/files
thats what I know, but how is it from the remote system?

scp /path/to/files userid@localsystem:/where/to/copy/them

i guess. But then, I dont know the IP of my localsystem. So how to find out from where I am connecting?
 
Old 09-02-2004, 08:43 AM   #4
SiLiCoN
Member
 
Registered: Sep 2004
Location: India
Distribution: Solaris 9, FreeBSD 4.10, Slackware, RedHat, Knoppix,
Posts: 84

Rep: Reputation: 15
why not do a /sbin/ifconfig to find out the ip of yr localsystem....

else u can also ssh to the server
and from there do a 'w' or 'who' to see the ip from which u r connecting and then u can use username@ip.address for scp
 
Old 09-02-2004, 09:11 AM   #5
mehlkelm
Member
 
Registered: Apr 2003
Location: Basel, Switzerland
Distribution: Ubuntu, OS X
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
why not do
because that is what I didnt know and I was looking for.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 34 05-24-2013 10:28 AM
scp/ssh tail(multiple file) remote copy tpreitano Linux - General 1 08-22-2005 03:17 PM
how to copy files from a remote server man1979 Linux - General 3 08-16-2005 07:08 AM
remote copy help me. suguname Mandriva 6 01-27-2005 04:33 AM
copy files using SSH from a server to another..both remote Santosh_d Linux - Networking 6 03-11-2004 12:02 AM


All times are GMT -5. The time now is 08:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration