LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-29-2008, 09:18 PM   #1
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Rep: Reputation: 15
SFTP "get" creates another copy on remote machine


I'm running ubuntu 8.04 with ssh server. I do the following with putty from my windows machine:

1. connect/login to linux machine with ssh
2. login to sftp, "sftp user1@desktop", enter password
3. try to get a file, "get Desktop/testFile"
4. receive message, "Fetching /home/user1/Desktop/testFile to testFile"

The file is transferred to another directory on the linux machine, it doesn't get to the windows machine. It is copied from /home/user1/Desktop to /home/user1.

I tried entering remote directories such as "get Desktop/testFile C:/testFile", but received an error: "Couldn't open local file "C:/testFile" for writing: No such file or directory".

Command "get Desktop/user1 C:/" resulted in "Couldn't open local file "C:/" for writing: Is a directory".

Any ideas on transferring the file?
 
Old 09-29-2008, 09:33 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Just use scp (actually in your case that'd be pscp from the MS box).
 
Old 09-30-2008, 11:54 AM   #3
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
I already installed WinSCP and it works properly, it can copy files from the linux machine to my windows comp.

I just want to know how to do it with putty command line using sftp. The help pages for sftp said issuing the get command would transfer the file but it doesn't.

I'll try SCP, but I'd rather figure out why sftp isn't working.

Last edited by Shwick; 09-30-2008 at 11:55 AM.
 
Old 09-30-2008, 08:16 PM   #4
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
I found the problem, I was already logged onto ubuntu from ssh so the local directory was the ubuntu directory. Use a sftp client like psftp, http://the.earth.li/~sgtatham/putty/.../x86/psftp.exe.

This thread helped me: http://ubuntuforums.org/showthread.php?t=369221
 
  


Reply



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
BIND With CentOS - Cant "DIG" From Remote Machine ihod2008 Linux - Server 1 03-05-2008 03:57 AM
How do i "copy" one bios and "paste" it onto another identical machine Yerp Linux - Hardware 2 01-10-2007 08:31 PM
evdev creates mouse "jaggies" enigma_0Z Linux - Hardware 0 11-14-2006 09:05 AM
Ntfs-Fuse copy error Debian "Sid" / Ubuntu "6.06" animefriik Linux - General 0 10-06-2006 09:28 AM
"C" program creates Seg fault 320mb Programming 4 06-24-2006 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration