LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 03-19-2015, 01:12 PM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896

Being logged into the server the command as executed would of transfered the file to the server itself if I understand what you have posted.
 
Old 03-19-2015, 01:21 PM   #17
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
would this command work:
Code:
scp [file to be copied] some_user@my_ip:[destination_folder]
or
Code:
scp file.txt login@INTERNET_IP -R [port]:local_ip:[port]:[destination]

Last edited by vinay45; 03-19-2015 at 01:23 PM.
 
Old 03-19-2015, 01:32 PM   #18
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
You are logged into the vps using putty on the windows PC. You can not transfer files to the windows PC using scp (assume a ssh server is not installed on the windows pc). As suggested in an early post to use winscp or filezilla.
 
1 members found this post helpful.
Old 03-19-2015, 02:22 PM   #19
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by vinay45 View Post
sorry mate the diretory that i used was wrong instead of 'downloads' i used 'download'
it still doesn't copy the file to my computer this is what i get:
Code:
[root@vinay ~]# scp root@vinay:/home/joyyy/Downloads/final.pdf .
root@vinay's password:
final.pdf                                     100   36MB  35.8MB/s   00:01
I think you're confused about how scp works. You wouldn't SSH into a server then use scp to copy from it -- you would use scp on your desktop to connect to the server and grab the file. Of course, if you have an SSH server running on your desktop to which your server can connect you can do it that way but it's back to front.
Remember that puTTY is an SSH client and not a Linux shell so every command typed in there is being run on the remote server not the local Windows desktop.
 
1 members found this post helpful.
Old 03-19-2015, 03:26 PM   #20
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
I use winscp on windows to copy files to/from remote servers.
 
1 members found this post helpful.
Old 03-19-2015, 11:45 PM   #21
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Doug G View Post
I use winscp on windows to copy files to/from remote servers.
thank you everyone,i was curious to know how to use the command line to copy file although this fixed the issue.
 
Old 03-20-2015, 12:30 PM   #22
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
... ,i was curious to know how to use the command line to copy file ...
If you're running the command prompt on the windows machine with putty installed, putty includes a command-line windows scp program called pscp. It's similar to the linux scp program, but check the help file for syntax details.
 
Old 03-21-2015, 04:09 AM   #23
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
I tried pscp in windows command line but it doesn't work
'pscp' is not recognized as an internal or external command,
operable program or batch file.
 
Old 03-21-2015, 05:20 AM   #24
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
The directory where you downloaded pscp is not in the path environment. You need to use the cd command just like linux.
 
1 members found this post helpful.
Old 03-21-2015, 10:08 AM   #25
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I think pscp has to be downloaded separately -- it certainly looks that way from the website, anyhow.
 
1 members found this post helpful.
Old 03-22-2015, 09:22 AM   #26
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
Thanks guy finally figured out how its to be done.Here's the syntax :
Code:
C:\Program Files (x86)\PuTTY>pscp root@XXX.XXX.XX.X:/home/joyyy/Downloads/CentOS
-7.0-1406-x86_64-DVD.iso E:\
I was not using the 'cd' command at first thats why it didn't work thanks to all,
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Quarter 1, 2012: Home Theater, Home Server, Gaming, & Personal Computer System Design Guide & LXer Syndicated Linux News 0 04-14-2012 02:00 AM
Copying a file as root through an intermediate computer. quyzbuk Linux - Newbie 6 07-28-2010 09:42 PM
Ftp-server on home computer makowka Linux - Server 3 10-11-2009 01:06 PM
making a webpage server and home network server on the same computer ferretmanus Linux - Networking 1 09-11-2003 10:45 AM
Mountind drives / Copying file from home drive to floppy ozwalker Linux - Newbie 1 09-04-2003 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 09:38 AM.

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