Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-02-2004, 09:37 PM   #1
GFED
Confirmed User
 
GFED's Avatar
 
Industry Role:
Join Date: May 2002
Posts: 8,120
SSH server to server

oki...

How do I transfer a file from one server to another using SSH?

With FTP I can use the get or put command...

But when I SSH into my server I don't have this command...

GFED is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2004, 10:14 PM   #2
zagi
Confirmed User
 
Join Date: Jan 2004
Posts: 1,238
from ssh you can do :


ftp new-host-name.com

and use regular ftp


-OR-

scp local_file user@remotebox:/dir/to/place/file/in
__________________
Managed US/NL Hosting [ [Reality Check Network ]
Dell XEON Servers + 1/2/3 TB Packages ICQ: 4-930-562
zagi is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2004, 10:16 PM   #3
JulianSosa
Confirmed User
 
Join Date: Aug 2003
Posts: 3,042
fetch
JulianSosa is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2004, 10:51 PM   #4
SeTec
Confirmed User
 
Join Date: May 2004
Location: CA
Posts: 440
why use ssh then ftp? kinda defeats the purpose. use sftp or scp. type man sftp or scp for more info
__________________
ICQ # 916111
SeTec is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2004, 11:00 PM   #5
Nasty
Confirmed User
 
Nasty's Avatar
 
Industry Role:
Join Date: Aug 2002
Location: Sunny Fucking California
Posts: 1,575
This will transfer a file or a whoel directory tree, just execute it from the directory you are wanting to cop to the second server and have your root password the second machineready

tar cpf - . | ssh [email protected] 'cd /path/on/new/server; tar xvf -'
__________________

“Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. If we continue to develop our technology without wisdom or prudence, our servant may prove to be our executioner.” ― Omar Bradley (1948)
Nasty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2004, 01:25 AM   #6
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
For one file you may well have a command named
GET (capitalized).
You can also use wget:
wget ftp://user:[email protected]/dirr/file.zip

There are also likely comands named "ftp" and "ncftp",
but you'll need to know a few FTP commands to use them.
ncftp is better and easier, if it's available.
If you're transferring a lot of files, you can use a tar pipe (below).
If you're transferring EVERYTHING, like moving from one
dedicated server to another, you'll need to do more than
just move files and having a pro handle it can save you
not only a lot of hassle but also a lot of money (downtime, etc.)

I've probably moved people from one server to another
100 times and I STILL carefully follow a written checklist
because without it I would miss things and there would
be probems. For example, if I forgot to set the DNS TTL
48 hours before the move new members may not be able
to access the site for the first couple of days of their
membership and expiring members may live on forever on
the new server.

Anyway, a tar pipe to copy a directory:

copy from here to there:
cd /home
tar --gzip --sparse --preserve --same-owner --atime-preserve -B -cvf - . |
ssh user@host "cd /home; tar -B --ungzip --preserve --same-owner --atime-preserve --sparse -xvf -"


copy to me:
ssh -l root otherserver.com "cd /home/user/somedir; tar -B --gzip --preserve
--same-owner --atime-preserve --sparse -cvf - ." | tar --ungzip --preserve -B
--same-owner --atime-preserve --sparse -xvf -
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2004, 03:03 AM   #7
GFED
Confirmed User
 
GFED's Avatar
 
Industry Role:
Join Date: May 2002
Posts: 8,120
Thanks!

GFED is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2004, 03:37 AM   #8
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
easier method:

scp localfile [email protected]:/home/remoteuser/
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.