Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SCP to a local drive? 2

Status
Not open for further replies.

RottPaws

Programmer
Mar 1, 2002
478
US
What is the command to SCP a file from/to the remote host to/from a local drive?

I'm using Putty to SSH into a remote Linux box. I'd like to use SCP to copy a file from that machine to my local machine, edit it and then copy it back.

FTP and other communications programs are not an option at this time.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
from the target:

scp user@host:/path/file /path_dest/file

Chacal, Inc.[wavey]
 
Thanks, but I can't seem to get it to work.

I forgot to mention the local machine is a Windoze XP box, if that makes a difference.

Is "host" literal? Or do I need to replace that with the computer name? For user, do I need to include my domain? I've tried a number of combinations but have not been able to get anything that works.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
user@host:/path/file

user is any Linux user existing in you linux box (from where you are getting the file)

host is your linux box, replace it with the host name (if it exists in a DNS) or with the IP Address.

Cheers.

Chacal, Inc.[wavey]
 
Perhaps I'm not asking the question correctly. I physically using a Windows XP box anx connected to a linux box via ssh. I can scp files between the Linux box and another unix box with no problems.

What I want to do is scp a file from the Linux box to the Windows workstation that I am physically working on and then copy it back when I'm finished editing the file.

I am using PuTTy to ssh into the Linux box. How can I point to the Windows workstation hard drive for the source/destination from within the ssh terminal window ?

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
you can't do it from linux to windows, windows doesn't have SSH server. you need to do it from windows with some utility as pscp.exe (from putty web page).

Another way is to share some folder from your PC and mount it from your linux box with:

mount -t smbfs //windows_pc_IP/folder_shared_name /mnt_point

so you can copy in the linux box the file to /mnt_point and you gonna have the file in the windows PC.
Cheers.

Chacal, Inc.[wavey]
 
OK. Thanks for the info.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top