![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
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... ![]()
__________________
https://www.flow.page/savethechildren |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Aug 2003
Posts: 3,042
|
fetch
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
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) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: May 2002
Posts: 8,120
|
Thanks!
![]() ![]() ![]()
__________________
https://www.flow.page/savethechildren |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Aug 2002
Posts: 2,781
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |