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: issue with transferring text files from windows to *INX using scp/sf

Subject: Re: issue with transferring text files from windows to *INX using scp/sftp
Date: Tue, 12 Feb 2008 09:28:30 -0500
Good morning Mike.

Each line of text files transferred from windows to
*INX using scp/sftp contains Control-M characters. It is a pain to run dos2unix utils when there are a
few hundred files.

I can definitely see that.

I did not experience issue when using ftp to transfer
files from windows to *INXs systems

ftp is a different animal.

Is there a switch or ssh_config configuration setting
to suppress the Crontrol-M during transfer ?

Not that I have been able to find (but I'm no sftp/scp guru). If you were going the other way *NIX to windows then it would be trivial to write a shell script to do all that for you. For example:


# just put all the files to send into the directory called 'tosend'
# and create another directory called 'sent' and be in in the
# directory right above the 2 tmp directories when you run
# the script

for file in `ls tosend`
   do
      [command-to-remove-cr-from-file] tosend/$file >$file.tmp
                        or
      [command-to-remove-cr-from-file] tosend/$file -o $file.tmp
      scp $file.tmp user@hostname:/path-to-directory/$file
      mv tosend/$file sent
      rm $file.tmp
   done

This is an inelegant script and I'm sure that the 'real' *NIX admins out there could do a better job (after they stop laughing), but you get the idea.

So, how does this help you running under windows? Well, there is a UNIX environment you can install from microsoft but I personally use Cygwin (cygwin.com). Just install that and you're away to the races.

Hope this helped.

Cheers.

Attachment: frank.vcf
Description: Vcard

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