LinuxQuestions.org
Help answer threads with 0 replies.
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, 08:35 AM   #1
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Rep: Reputation: Disabled
Copying file from server to home computer.


while i was trying to copy a file from my server to my home computer using this command :
Code:
[root@vinay ~]# scp final.pdf root@vinay:1 -R 5:xxx.xxx.x.xxx:5 /home/joyyy/Downloads
it gives me this output:
Code:
[root@vinay ~]# scp final.pdf root@vinay:1 -R 5:xxx.xxx.xxx.xxx:5 /home/joyyy/Downloads
cp: cannot stat final.pdf: No such file or directory
root@vinay's password:
scp: 1: No such file or directory
cp: cannot stat -R: No such file or directory
ssh: connect to host 5 port 22: Invalid argument
[root@vinay ~]#
is it that ssh'd is not installed on this directory

Last edited by vinay45; 03-19-2015 at 08:37 AM.
 
Old 03-19-2015, 08:47 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Your scp syntax looks totally wrong, what are you actually trying to copy and to where?
 
Old 03-19-2015, 08:59 AM   #3
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
I am trying to copy a pdf file from the directory :
Quote:
/home/joyyy/Downloads
on my dedicated vps the host name is 'vinay'.i need to copy it to my pc at home.
 
Old 03-19-2015, 09:44 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
If you're running the command on your PC at home:

Code:
scp root@vinay:/home/joyyy/Downloads/final.pdf .
Will copy the file final.pdf from the folder /home/joyyy/Downloads/ on the server vinay using the root user and copy it to the current folder.
 
1 members found this post helpful.
Old 03-19-2015, 10:00 AM   #5
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
here the out put :
Code:
[root@vinay ~]# scp root@vinay:/home/joyyy/Download/final.pdf .
root@vinay's password:
scp: /home/joyyy/Download/final.pdf: No such file or directory
[root@vinay ~]#
 
Old 03-19-2015, 10:10 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
So adjust the path/file name accordingly.
 
Old 03-19-2015, 10:25 AM   #7
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
there seems to be nothing wrong with the path or file name.
 
Old 03-19-2015, 10:29 AM   #8
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Hard to copy a file that doesn't exist where you think it is. Good luck.
 
Old 03-19-2015, 10:39 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
As stated the first problem is final.pdf is not found in the directory.
Are you logged into and running the command from your VPS?
 
1 members found this post helpful.
Old 03-19-2015, 11:23 AM   #10
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
sorry mate
no i am running it through putty from windows,also note that i have got the desktop environment running on the vpn.i can access it by VNC.
i am only learning to use command lines and putty.

Last edited by vinay45; 03-19-2015 at 11:44 AM.
 
Old 03-19-2015, 11:42 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Is the windows PC your home PC?
 
1 members found this post helpful.
Old 03-19-2015, 12:53 PM   #12
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
yes its my home pc
 
Old 03-19-2015, 01:01 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I suggest using a windows sftp client application like winscp or filezilla. You can also download pscp from the PuTTy site that works just lke the native scp linux client.

You can not use scp as desired without having a ssh server running on the windows computer.
 
1 members found this post helpful.
Old 03-19-2015, 01:03 PM   #14
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
Hard to copy a file that doesn't exist where you think it is. Good luck.
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
 
Old 03-19-2015, 01:09 PM   #15
vinay45
Member
 
Registered: Mar 2015
Location: india
Distribution: ubuntu
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
I suggest using a windows sftp client application like winscp or filezilla. You can also download pscp from the PuTTy site that works just lke the native scp linux client.

You can not use scp as desired without having a ssh server running on the windows computer.
ok i will try it thank you
how can i install an ssh server on my pc

Last edited by vinay45; 03-19-2015 at 01:10 PM.
 
  


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 02:32 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