LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2012, 02:37 PM   #1
ggalan
Member
 
Registered: Oct 2010
Posts: 57

Rep: Reputation: 0
upload ssh


i am trying to upload using ssh like this
Code:
scp D:/xampp-1.77/htdocs/directory/path/dummy.txt root@***.**.***.**:/etc/httpd/directory
but i keep getting this message


ssh: Could not resolve hostname D: Name or service not known


what am i doing wrong?

Last edited by ggalan; 01-09-2012 at 11:58 AM.
 
Old 01-06-2012, 02:40 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Hello,

It seems like you almost have windows drive names mixed up in your understanding of linux; Is "D" a hard drive, according to windows? You don't need this - If dummy.txt is on your local hard drive that you are using on your computer, you can do it like so:
Code:
scp /xampp-1.77/htdocs/directory/path/dummy.txt root@***.**.***.**:/etc/httpd/directory
Cheers,

Josh
 
Old 01-06-2012, 02:42 PM   #3
ggalan
Member
 
Registered: Oct 2010
Posts: 57

Original Poster
Rep: Reputation: 0
i am trying to upload from my windows machine to linux server. if i dont put 'D:' how will the upload know which drive to look for?
 
Old 01-06-2012, 03:01 PM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Oh ok, I am sorry for the confusion; You didn't specify from windows to linux. Honestly, I never scp'd any files from windows to linux; have you tried putting D:/xampp-1.77/htdocs/directory/path/dummy.txt in quotes?
 
Old 01-06-2012, 03:13 PM   #5
ggalan
Member
 
Registered: Oct 2010
Posts: 57

Original Poster
Rep: Reputation: 0
i didnt know that windows -> linux via ssh was an issue, found this
http://techie-buzz.com/tips-and-tric...sing-pscp.html
 
Old 01-06-2012, 03:18 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
I was actually about to mention pscp..... Have you tried it yet?
 
Old 01-06-2012, 03:19 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
MS syntax would normally be:
Quote:
scp D:\xampp-1.77\htdocs\directory\path\dummy.txt root@***.**.***.**:/etc/httpd/directory
 
Old 01-06-2012, 03:22 PM   #8
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by michaelk View Post
MS syntax would normally be:
Oh wow... I completely overlooked that. Thanks man! LOL......
(Goes to show how much I do NOT work with windows anymore.....)
 
Old 01-06-2012, 03:31 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
How soon one forgets

By using / it appears that scp is trying to parse D: as a server name rather then file.
 
Old 01-06-2012, 03:36 PM   #10
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Exactly..... I guess I need to install windows on a VM and catch back up, huh?
 
Old 01-07-2012, 04:21 PM   #11
ggalan
Member
 
Registered: Oct 2010
Posts: 57

Original Poster
Rep: Reputation: 0
i downloaded pscp on my windows machine to x-fer pc -> linux server
but how does putty know where this program is?
i get an error
pscp: command not found
 
Old 01-07-2012, 04:28 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
You need to be in the directory where you downloaded pscp or add the directory to the path environment to execute the program.

BTW filezilla and winscp or two windows GUI apps that can transfer files via ssh that might be easier for you then using the command box.

Last edited by michaelk; 01-07-2012 at 04:33 PM.
 
Old 01-07-2012, 04:45 PM   #13
ggalan
Member
 
Registered: Oct 2010
Posts: 57

Original Poster
Rep: Reputation: 0
Quote:
You need to be in the directory where you downloaded pscp or add the directory to the path environment to execute the program.
this is for windows cmd, but i wouldnt execute it from there would i?
i thought i would be using putty for this
 
Old 01-07-2012, 05:32 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
lets start over and please explain in detail how your computer(s) are configured and exactly what you are trying to accomplish.

I am assuming that windows and linux are running on separate PCs.
Are you running cygwin on windows?

PuTTy is also a windows telnet/ssh client like linux ssh but there are also command line applications for scp (pscp) and sftp (psftp) like those found on linux/unix systems.

PuTTy lets one login to a remote server and typically execute console commands.
scp and sftp lets one transfer files securely via ssh to a server.

Yes, to transfer files from window to linux you need to run the desired programs from the windows PC.
 
Old 01-07-2012, 07:01 PM   #15
ggalan
Member
 
Registered: Oct 2010
Posts: 57

Original Poster
Rep: Reputation: 0
im on windows 7 with putty > ssh > linux server
i want to upload files from windows to linux
i have pscp.exe and wish to use it with putty

question:
how does this tie together?

i can see that if i use windows cmd, pscp.exe is recognized but a key is required
when i use putty, the key is present but pscp.exe is not recognized

does that make sense?
 
  


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
[SOLVED] download/upload manager for ssh on flaky network carolus Linux - Networking 3 11-28-2011 04:06 PM
command Line SSH download-upload mirat46 Linux - Newbie 1 05-11-2006 05:12 PM
Proftpd upload to a folder other than 'upload' fooboo Linux - Software 4 04-27-2006 08:51 PM
IglooFTP-PRO refuses to upload files in folder when I upload folder eBopBob Linux - Software 0 08-27-2004 06:52 AM
File Upload through SSH kanagaraj Linux - Software 5 09-26-2003 02:59 PM


All times are GMT -5. The time now is 08:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration