LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-29-2011, 09:43 PM   #1
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Rep: Reputation: Disabled
Copy file from Windows PC using ssh


I need to be able to upload a file.. simple enough.

No root access, only sudo su

Whenever I try to copy the file, I receive a File not found. I believe this happens because I can't put in the path to the file, i.e. C:\test.txt

Code:
scp test.crt user@domain:/etc/httpd/conf/ssl.key
Any sftp editor I use to upload gives permission errors.

So what can I do? (Centos5.6)
 
Old 09-29-2011, 10:32 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,675

Rep: Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260
If you think it is the path in windows then change to the directory that has the file you want to copy. Then the path would not be used.

You can use scp "c:\windows\test.txt" I believe if you want the full path.
 
Old 09-29-2011, 10:53 PM   #3
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
I had tried that originally and received
Code:
ssh: c: Name or service not known
 
Old 09-29-2011, 10:55 PM   #4
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
If you think it is the path in windows then change to the directory that has the file you want to copy
I'm connecting via Putty. I don't follow what you mean here.
 
Old 09-29-2011, 11:02 PM   #5
snooly
Member
 
Registered: Sep 2011
Posts: 124

Rep: Reputation: Disabled
Please try using slashes instead of backslashes. Backslashes are often used to escape the next character, and that causes no end of troubles. So instead of c:\test.txt, try c:/test.txt.

If that doesn't work, try using two backslashes instead of one, such as c:\\test.txt
 
Old 09-29-2011, 11:04 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

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

To clear up any confusion, look at this thread - http://www.linuxquestions.org/questi...achine-316263/

Cheers,

Josh
 
Old 09-29-2011, 11:38 PM   #7
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Got it.

Because there is no root access, I couldn't put the file where I needed to in 1 step. Instead, I used pscp (thanks for the link) and uploaded the file to my user directory. Then, through SSH, I was able to sudo and move the file where it need to be.

Thanks for the all the help.

Tony.
 
Old 09-30-2011, 12:13 AM   #8
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Anytime man. Mark your thread as solved if this answers all of your questions!

Cheers,

Josh
 
  


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
copy file using SSH pinga123 Linux - Newbie 2 06-23-2010 06:15 AM
making a working copy of file system over ssh undeadmachine Linux - Newbie 4 10-25-2007 12:47 AM
How to copy a file over SSH session. makkays Linux - General 11 12-05-2006 01:13 PM
SCP Copy File SSH petenyce Linux - Wireless Networking 2 10-05-2005 04:11 PM
scp/ssh tail(multiple file) remote copy tpreitano Linux - General 1 08-22-2005 03:17 PM


All times are GMT -5. The time now is 05:38 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