LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Transfer file from one server to other (http://www.linuxquestions.org/questions/linux-networking-3/transfer-file-from-one-server-to-other-940601/)

Muhammad Awais 04-19-2012 02:41 AM

Transfer file from one server to other
 
Hi i want to know is there any command to transfer file from one server to a local machine in our office.

For example our server is 88.44.44.55 and our router's ip is 66.33.22.11 and my local ip is 192.168.1.1,
Now i want to transfer file from 88.44.44.55 to my own linux machine 192.168.1.1.

Is it possible???

Thanx In Advance

acid_kewpie 04-19-2012 02:45 AM

of course it's possible. I'd suggest scp to start with as the simplest way. Obviously you need to be able to reach one machine from the other first.

Muhammad Awais 04-19-2012 02:47 AM

Thanx acid_kewpie
This 88.44.44.55 ip is provided by our broadband service provider.
Can u please give me example of command line in linux???

Muhammad Awais 04-19-2012 02:48 AM

I want to write a script to automatically download backup from our server.

pan64 04-19-2012 02:51 AM

there are a lot of solutions, but mainly they are a pair of client-server applications.
So you can try scp, ftp, rsync, wget (these are the clients to work with), but all of them require a server (or at least some configuration) on the other side.
In general office can restrict the outgoing traffic and block incoming, so you need to set a server at home and run the client in the office. The router also should be configured to redirect the requests to your host.

acid_kewpie 04-19-2012 02:52 AM

I'm sure you can read the scp manpage for this, it's not hard to look up.

scp user@destination:/where/the/file/is/file.txt /where/the/file/goes

Muhammad Awais 04-19-2012 02:55 AM

In destination which ip should b giver the local machine ip or 88.44.44.55?
When i paste 88.44.44.55 the reply is
ssh: connect to host 88.44.44.55 port 22: No route to host
lost connection

acid_kewpie 04-19-2012 02:57 AM

We have no idea how your network is set up do we? give us some useful information to start with and we can try to work it out. but it's a big jump from having possibly no connectivity to copying a file, so work out what your current problem is first, before trying to fix an unrelated one.

Muhammad Awais 04-19-2012 03:04 AM

We download Backups from our server daily. Log files of radius and asterisk.
I want to write a script which automatically download files on our computer, Our server is in Germany and our office is located in Pakistan.
the service provider gives us 88.44.44.55 ip, and our backup computer which save backup have ip 192.168.1.1, now i want to transfer backup directly to our backup computer.
i m using this command scp blackup.out root@88.44.44.55: /root
but i m getting this error
ssh: connect to host 88.44.44.55 port 22: No route to host
lost connection

acid_kewpie 04-19-2012 03:05 AM

ok, that's repeating the stuff we DO know. how about the stuff we DON'T know? where does this public IP fit into it? Is internet involved etc..? what is the layout of your network? What security devices are involved? What device does this public IP reside on?

pan64 04-19-2012 03:13 AM

you can try traceroute 88.44.44.55 for example

Muhammad Awais 04-19-2012 03:26 AM

traceroute to 58.65.154.78 (88.44.44.55), 30 hops max, 40 byte packets
1 xx6651142097.cipherkey.com (66.55.44.97) 0.577 ms 0.593 ms 0.645 ms
2 xx208110096072.cipherkey.com (208.110.96.72) 0.264 ms 0.211 ms 0.194 ms
3 ge-6-10-340.car3.seattle1.level3.net (4.71.152.129) 4.955 ms 4.872 ms 4.858 ms
4 ae-32-52.ebr2.seattle1.level3.net (4.69.147.182) 11.157 ms 11.168 ms 11.124 ms
5 ae-2-2.ebr2.denver1.level3.net (4.69.132.54) 30.918 ms 31.172 ms 31.033 ms
6 ae-3-3.ebr1.chicago2.level3.net (4.69.132.62) 55.964 ms 55.760 ms 55.861 ms
7 ae-1-100.ebr2.chicago2.level3.net (4.69.132.114) 56.063 ms 56.006 ms 66.339 ms
8 ae-6-6.ebr2.washington12.level3.net (4.69.148.145) 76.714 ms 74.675 ms 70.754 ms
9 ae-5-5.ebr2.washington1.level3.net (4.69.143.221) 70.921 ms 70.751 ms 70.549 ms
10 ae-41-41.ebr2.paris1.level3.net (4.69.137.49) 150.292 ms ae-42-42.ebr2.paris1.level3.net (4.69.137.53) 150.588 ms 150.081 ms
11 ae-22-22.ebr1.paris1.level3.net (4.69.143.121) 150.438 ms 149.545 ms 150.298 ms
12 ae-1-7.bar1.marseille1.level3.net (4.69.143.237) 159.758 ms 160.404 ms 161.215 ms
13 ae-2-3.edge2.marseille1.level3.net (4.69.143.250) 160.401 ms 162.066 ms 160.738 ms
14 213.242.115.6 (213.242.115.6) 271.851 ms 213.242.115.2 (213.242.115.2) 272.715 ms 272.762 ms
15 static-10ge-khi494-p01-khi494-swb.pie.net.pk (202.125.128.157) 271.800 ms 270.202 ms 270.390 ms
16 rwp44.pie.net.pk (221.120.254.5) 294.432 ms 291.254 ms 292.492 ms
17 rwp44.pie.net.pk (221.120.253.10) 293.783 ms 293.879 ms 292.322 ms
18 rwp44.pie.net.pk (221.120.237.102) 301.394 ms 301.483 ms 292.447 ms
19 mbl-65-154-78.dsl.net.pk (88.44.44.55) 293.415 ms 293.367 ms 293.744 ms


This is the reply

acid_kewpie 04-19-2012 03:30 AM

so what IS 88.44.44.55?

Muhammad Awais 04-19-2012 03:32 AM

This ip is assign to us by our internet provider.
Internet is involved.

pan64 04-19-2012 03:33 AM

I would try a port scan, which ports are open, what can you reach from the other side?
do you know nmap?


All times are GMT -5. The time now is 03:40 AM.