Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: openssh: Limiting bandwidth on ssh (stdin-to-dd)

Subject: Re: openssh: Limiting bandwidth on ssh (stdin-to-dd)
Date: Mon, 17 Apr 2006 15:26:58 -0400




First off, I'm a windows admin, so if I tell you incorrectly... well...
expect me to tell you incorrectly and don't try this on a production box.
But I make an image of my windows servers using ntfsclone, and in it's man
page it has a great little string that basically does the same thing you
are wanting to do:

#ntfsclone --save-image --output - /dev/hda1 | gzip -c | ssh host 'cat >
backup.img.gz'

So, I imagine you can do the same with your server, maybe something like
the following may work:

#tar -cf - ./test_dir | gzip -c | ssh user@remote-server 'cat >
backup_test_dir.tar.gz'

I would suggest you have your ssh keys already setup, so once you have
tested this and if it works, you can put it in a cron job to do this
automatically. You may even be able (depending on what version/type of tar
you run) to make this string smaller by letting tar gzip or bzip2 the tar
file itself.

Again, I have NOT tested this, but it may at least help point you in the
right direction.


R. James Stull
Network Administrator
Caterpillar, Lafayette Engine Center
Email - stullrj@cat.com





                                                                           
             "Mark Holden"                                                 
             <mholden@nortel.c                                             
             om>                                                           
                                                                        To 
             04/17/2006 10:56                                           To 
             AM                        <secureshell@securityfocus.com>     
                                                                        cc 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                   Subject 
                                       openssh: Limiting bandwidth on ssh  
                                       (stdin-to-dd)                       
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



Caterpillar: Confidential Green                 Retain Until: 05/17/2006
                                                Retention Category:  G90 -
                                                General
                                                Matters/Administration


I'm looking at using "ssh" from the openssh package, to perform secure
backups of large directories from a local server to a remote server as
in the following command executed on the local server.

tar -cf - ./test_dir | ssh user@remote-server dd of=test_dir.tar

Ie., I don't want to first create the tar file on the local system then
use scp to copy it off, as there may not be enough disk storage on the
local system to create the tar file. However, I cannot seem to find any
way, for the above style of transfer using ssh, to do something like the
"-l" option of scp to limit the amount of bandwidth used during the
transfer.

Does anybody know of a way?

Thanks,
Mark



<Prev in Thread] Current Thread [Next in Thread>