LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-17-2008, 12:51 AM   #1
jus71n742
Member
 
Registered: Apr 2008
Distribution: Ubuntu 8.04 64bit/ 32bit, FreeBSD 8
Posts: 185

Rep: Reputation: 30
Exclamation SSH cp problem


I am trying to figure out how to change files/folders/programs from one machine to another via SSH shell. instead of opening each file and typing it up file by file since there are around 50 files or more.

any idea would be greatly appreciated
 
Old 05-17-2008, 12:56 AM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
You mean u want to copy those folders and files over?
You might have better look with lftp. Once logged into ftp server type:
mirror -R /folder /(wherever you want it on your local puter)
 
Old 05-17-2008, 01:04 AM   #3
jus71n742
Member
 
Registered: Apr 2008
Distribution: Ubuntu 8.04 64bit/ 32bit, FreeBSD 8
Posts: 185

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by trist007 View Post
You mean u want to copy those folders and files over?
You might have better look with lftp. Once logged into ftp server type:
mirror -R /folder /(wherever you want it on your local puter)
copy over yes that is what I want to do. so I log into my shell on the other computer and type the mirror -R etc etc and it will copy them over correct?
 
Old 05-17-2008, 01:22 AM   #4
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
not sure if that command will work in SSH
but it will work in lftp
 
Old 05-17-2008, 01:25 AM   #5
jus71n742
Member
 
Registered: Apr 2008
Distribution: Ubuntu 8.04 64bit/ 32bit, FreeBSD 8
Posts: 185

Original Poster
Rep: Reputation: 30
I need a way to do it through the shell. I have never used what you are suggesting. I am not above learning it if you know of a good tutorial or you have any suggestions on how to use this.
 
Old 05-17-2008, 01:29 AM   #6
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
lftp host -d -u <username>,<password>
mirror -R <folder> <destination on local hd>

if you don't have lftp then
yum install lftp -y (this works with Fedora 8, not sure what you have)
 
Old 05-17-2008, 01:32 AM   #7
jus71n742
Member
 
Registered: Apr 2008
Distribution: Ubuntu 8.04 64bit/ 32bit, FreeBSD 8
Posts: 185

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by trist007 View Post
lftp host -d -u <username>,<password>
mirror -R <folder> <destination on local hd>

if you don't have lftp then
yum install lftp -y (this works with Fedora 8, not sure what you have)
I have Ubuntu 7.10
I am going to say sudo apt-get install lftp.
and turns out I have it already on my computer lol ok thanks then

but one more question ...do I need to be in the directory of the files in order to copy them?

Last edited by jus71n742; 05-17-2008 at 01:37 AM.
 
Old 05-17-2008, 01:34 AM   #8
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
Try cp -R in the shell
 
Old 05-17-2008, 01:44 AM   #9
jus71n742
Member
 
Registered: Apr 2008
Distribution: Ubuntu 8.04 64bit/ 32bit, FreeBSD 8
Posts: 185

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by trist007 View Post
Try cp -R in the shell
so cp -R (~/files where what I want is located) files location on my HD, correct?

Last edited by jus71n742; 05-17-2008 at 01:51 AM.
 
Old 05-17-2008, 01:52 AM   #10
jus71n742
Member
 
Registered: Apr 2008
Distribution: Ubuntu 8.04 64bit/ 32bit, FreeBSD 8
Posts: 185

Original Poster
Rep: Reputation: 30
tried the mirror -R and mirror -r and with R I am getting the error that my folder is not there and the -r keeps attempting to reconnect with longer and longer times
 
Old 05-17-2008, 03:16 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
If you use scp, you could use the -r argument if you want to recursively copy a directory. There is also sftp. Another thing you can do is modprobe the fuse module and mount the remote directory. Then you can use cp, mv or even konqueror to copy or move files.
 
  


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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
SSH problem - ssh-add not respond FerkoPica Linux - Security 6 05-07-2006 04:47 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM
ssh problem after creating an ssh alias. porotothorpe Linux - General 2 01-25-2006 08:56 PM


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