-   Linux - Networking (
-   -   Transfer file from one server to other (

Muhammad Awais 04-19-2012 03: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 and our router's ip is and my local ip is,
Now i want to transfer file from to my own linux machine

Is it possible???

Thanx In Advance

acid_kewpie 04-19-2012 03: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 03:47 AM

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

Muhammad Awais 04-19-2012 03:48 AM

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

pan64 04-19-2012 03: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 03: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 03:55 AM

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

acid_kewpie 04-19-2012 03: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 04: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 ip, and our backup computer which save backup have ip, now i want to transfer backup directly to our backup computer.
i m using this command scp blackup.out root@ /root
but i m getting this error
ssh: connect to host port 22: No route to host
lost connection

acid_kewpie 04-19-2012 04: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 04:13 AM

you can try traceroute for example

Muhammad Awais 04-19-2012 04:26 AM

traceroute to (, 30 hops max, 40 byte packets
1 ( 0.577 ms 0.593 ms 0.645 ms
2 ( 0.264 ms 0.211 ms 0.194 ms
3 ( 4.955 ms 4.872 ms 4.858 ms
4 ( 11.157 ms 11.168 ms 11.124 ms
5 ( 30.918 ms 31.172 ms 31.033 ms
6 ( 55.964 ms 55.760 ms 55.861 ms
7 ( 56.063 ms 56.006 ms 66.339 ms
8 ( 76.714 ms 74.675 ms 70.754 ms
9 ( 70.921 ms 70.751 ms 70.549 ms
10 ( 150.292 ms ( 150.588 ms 150.081 ms
11 ( 150.438 ms 149.545 ms 150.298 ms
12 ( 159.758 ms 160.404 ms 161.215 ms
13 ( 160.401 ms 162.066 ms 160.738 ms
14 ( 271.851 ms ( 272.715 ms 272.762 ms
15 ( 271.800 ms 270.202 ms 270.390 ms
16 ( 294.432 ms 291.254 ms 292.492 ms
17 ( 293.783 ms 293.879 ms 292.322 ms
18 ( 301.394 ms 301.483 ms 292.447 ms
19 ( 293.415 ms 293.367 ms 293.744 ms

This is the reply

acid_kewpie 04-19-2012 04:30 AM

so what IS

Muhammad Awais 04-19-2012 04:32 AM

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

pan64 04-19-2012 04: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 12:27 PM.