The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Microsoft Security Advisory (910550): Macromedia Security Bulletin: MPSB05-07 Flash P iBot Security Advisories (RSS) - Microsoft 0 04-06-2008 01:50 AM
Microsoft Security Advisory (912945): Non-Security Update for Internet Explorer - 6/1 iBot Security Advisories (RSS) - Microsoft 0 12-24-2007 07:00 AM
Microsoft Security Advisory (910550): Macromedia Security Bulletin: MPSB05-07 Flash P iBot Security Advisories (RSS) - Microsoft 0 12-24-2007 07:00 AM
Mandriva Linux Security Update Advisory - gdm (MDKSA-2007:169) - Help Net Security iBot UNIX and Linux RSS News 0 08-22-2007 03:40 AM
Trustix Secure Linux Security Advisory - bind, clamav, curl ... - Help Net Security iBot UNIX and Linux RSS News 0 07-30-2007 03:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-06-2002
thekid
Guest
 

Posts: n/a
ftp security

I have written a number of ftp scripts to put/get files between unix and other systems. My scripts only ftp to servers inside of our firewall. However, I have heard of risks involved with using the typical ftp automation techniques if one goes into unsecure areas with thier ftp processes.

Typical to me:

ftp -i -v -n [hostname] <<EOF
user USERNAME PASSWORD
hash
cd [to_dir]
lcd [from_dir]
put FILENAME
close
bye
EOF

The main risk I have heard of is that the username and password are passed in plain text. Are there any ways to get around this on the shell scripting level? Or, do other options need to be considered?

Let me know if more details are needed...
Reply With Quote
Forum Sponsor
  #2  
Old 03-06-2002
auswipe's Avatar
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
Another way to get a secure FTP is to use SSH and use programs like PSFTP (on Win32 clients) or sftp (on Unix clients) to transfer files via SecureShell without having the security problems related to clear text passwords sent via ftp.

I have used psftp from work to send files to my boxes at the house and it works very well, but is slower than traditional ftp.

You can also use scp (secure copy) on a file by file basis to transfer files from one system to another.
__________________
Not quite as cool as all the other Kids...
Reply With Quote
  #3  
Old 03-15-2002
thekid
Guest
 

Posts: n/a
Thanks for the input. I also came across some info on using a .netrc file, so I will check into that also.
Reply With Quote
  #4  
Old 03-15-2002
thehoghunter
Guest
 

Posts: n/a
Using .netrc or anonymous ftp are not secure. The password of an account is either vulnerable in the .netrc file, in the transmission, or in the script file.

You would be better off using one of the programs auswipe wrote about. If you are worried about security.
Reply With Quote
  #5  
Old 03-19-2002
Registered User
 

Join Date: Sep 2001
Posts: 36
I have a similar problem.

I have to tansfer 6 files from one unix box 'a' to another 'b'. I tried 'rcp' but file system on b does not allow the files to be rcp'ed from a.

My system admin has refused to use .netrc (due to security issues).

Could not transfer files using sftp.

Any other techniques available to transfer files from one box to another.

I am (trying to) transferring files from HP to Sun Solaris.

SunOS 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-Enterprise

HP-UX B.10.20 B 9000/891 350319241
Reply With Quote
  #6  
Old 03-19-2002
thehoghunter
Guest
 

Posts: n/a
Have you tried both ways? Attempting to transfer files by logging into HP and sftp to SUN and logging into SUN and sftp to HP? On one side you would do a put, on the other side you would do a get. Or do you have secure copy (scp part of ssh). Or can you share a drive between the systems (NFS). Or is the home directory a shared drive (will mount on both systems - put the file in /home and it will be there)

FYI - If the system administrator will not allow .netrc (I don't blame him/her) then make the system administrator find a fix. If you have a valid need to transfer files, then you bring that need to the Sys Admin and they need to come up with a way to meet the business need and keep systems secure.
Reply With Quote
  #7  
Old 03-19-2002
penguin-friend
Guest
 

Posts: n/a
A big security gap

I personally think that all mounts are big security gaps on systems.

I think you should try scp from any ssh dist.

Maybe your rcp doesn't work because the .rhosts doesn't exist. This is also a security gap. I would really recommend using SSH..

Jason
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0