LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 03-03-2011, 02:02 PM   #1
assi9
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 4
Wink SCP over SSH


Long time lurker, first time poster, figured I would post a success story! \o/

So I had just finished configuring my new debian sever and it was time to transfer files from the old worn out Ubuntu LAMP server. Well I haven't played around much with the command line network file transfers so I decided to give SCP a go.

I was at work, so I ssh'd into my new server,I then ssh into my old server and attempted to scp the files back to my new server. NO DICE...it kept making a new directory on the same local machine. All the guides I had read (before coming here and reading a few posts) made no mention of scp is meant to be used WITHOUT having to connect via ssh first. So...that knowledge in hand I clean up the mess of files I just created, exit ssh and do scp for real this time.

Working command from my home server (not the remote one) as follows...

scp -r root@THEremoteSERVERipaddress:/where-the-files-are/on-the-old-machine /dir where/i-want-stuff-to-go-on-my-new-server

(the -r modifier is used to copy entire directories)

Hope this helps someone someday!
 
Old 03-03-2011, 02:09 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Good job on that.

As a side note. SCP is slow as molasses.

use Rsync.
 
  


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
[SOLVED] SSH/SCP help Jinouchi Linux - Newbie 9 02-14-2010 10:37 PM
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 02:23 AM
scp and ssh linderox Linux - Networking 2 11-19-2007 02:04 AM
ssh scp question shanenin Linux - Networking 3 10-14-2004 12:26 AM
SSH - where are scp and sftp satimis Linux - Networking 2 11-15-2003 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 11:12 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
Open Source Consulting | Domain Registration