LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-19-2012, 04:22 AM   #31
Muhammad Awais
LQ Newbie
 
Registered: Apr 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled

Because i made a script which automatically make .tar.gz file and i want to add this command so after completing the compression it download the file...
 
Old 04-19-2012, 04:30 AM   #32
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
OK.
Presumably you have a static public IP in Pakistan?
If not, then it won't work if your IP keeps changing every few days...
So you will need to set up ssh-server on your Pakistan machine, along with key-based auth, and forward an appropriate port (probably NOT 22 would be best) on your router.
 
Old 04-19-2012, 04:33 AM   #33
Muhammad Awais
LQ Newbie
 
Registered: Apr 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Our ip is static.
Can u please explain the procedure little bit.
 
Old 04-19-2012, 04:39 AM   #34
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I just did.
 
Old 04-19-2012, 02:01 PM   #35
joker20
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware/Ubuntu/CentOS
Posts: 286

Rep: Reputation: 31
clearly someone needs their hand held so let me see if i can put an end to all of this madness.
you want to scp a tarball from your server to your workstation (its easier to do it vice versa but whatever)

client config:
you'll need to setup an openssh server on your workstation (ill leave that up to you to figure out)
make sure openssh is started, a quick way to determine this is to do `nmap localhost` - look for 22 OPEN
if you're running iptables or some kind of firewall you'll also need to make sure port 22 is accepted/permitted

router:
im not sure what kind of router you have in Germany but either way you'll need to setup port forwarding (nat statements) TO your workstation on port 22

server:
if you can ssh from your server to your workstation then you'll obviously see traffic is working as it should.
from here you'll need to set up a key pair so you can ssh without a password as noted earlier in this thread. a good tutorial of this is here http://www.thegeekstuff.com/2008/11/...n-ssh-copy-id/
if you've made it this far and everything is working like it should you can no go ahead with whatever method you want to use to transfer your files

you@server:-$ scp user@client:/path/to/logfile /local/path/to/put/logfile

a cron job w/ scp would be a good option

the rest is up to you...

Last edited by joker20; 04-19-2012 at 02:03 PM.
 
1 members found this post helpful.
Old 04-19-2012, 03:07 PM   #36
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by joker20 View Post
you@server:-$ scp user@client:/path/to/logfile /local/path/to/put/logfile
In the interest of NOT overwriting the server log with the old copy from the workstation, this should be
Code:
you@server:-$ scp /local/path/to/logfile user@client:/remote/path/to/put/logfile
 
Old 04-19-2012, 03:12 PM   #37
joker20
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware/Ubuntu/CentOS
Posts: 286

Rep: Reputation: 31
Quote:
Originally Posted by descendant_command View Post
In the interest of NOT overwriting the server log with the old copy from the workstation, this should be
Code:
you@server:-$ scp /local/path/to/logfile user@client:/remote/path/to/put/logfile
ah, thanks for that - i copied that syntax from someone elses post above me and just swapped server for client without fixing the rest hahaha, but ya thats what it should look like
 
Old 04-19-2012, 10:37 PM   #38
Muhammad Awais
LQ Newbie
 
Registered: Apr 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanx Every one, Problem Solved
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cilent to transfer file through NFS to server Alck Linux - Server 2 07-23-2009 08:40 PM
file transfer server required ltodd2 Linux - Software 3 06-19-2009 03:48 AM
Secure file transfer server - tools ? taphagreg Linux - Security 1 03-19-2007 10:52 PM
a simple file transfer server.. sachitha Programming 2 09-09-2006 08:08 PM
Transfer file from slack to school server mustangfanatic01 Slackware 2 11-27-2005 02:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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