The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl Hash Harikrishna Shell Programming and Scripting 1 06-04-2008 07:03 AM
Perl Hash Harikrishna Shell Programming and Scripting 1 06-02-2008 11:45 PM
Hash in perl Harikrishna Shell Programming and Scripting 1 06-02-2008 04:00 AM
MD5 hash filename bebar Shell Programming and Scripting 1 10-26-2007 01:44 PM
md5 hash a string or char array in SCO jcarter2333 High Level Programming 5 02-08-2007 04:09 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-28-2008
StHalcyon StHalcyon is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 1
String hash/obfuscation in ksh

I have a vendor that needs to install a set of scripts (written in korn) that will be run as root through crontab every day. This set of scripts will need to ssh as root to other servers without getting challenged for user name or password. So I have set up ssh key pairing and authorized_keys file.

But here's the thing. Users who log in to a server as themselves can su to root, then ssh directly to other servers as root. This breaks accountability. So, I decided to yank out the "IdentityFile" line in root user's ssh config, which will force users who are in root to now use the -i parameter when using ssh or scp commands. This obviously needs to be modified in the vendor's scripts as well.

However, I would hate to have the script contain a variable called "ssh_ID" so that the scripts can run something like this: /usr/bin/ssh -i ${ssh_ID} [remote_commands]

I want to see if there are simple string obfuscation scripts for korn shell that I can incorporate into the vendor scripts, so that ssh_ID is assigned the hashed string (instead of "/root/.ssh/id_dsa"). Apparently there are several samples out there for perl, but none for Korn shell. I'm sure I can try something myself, but I'm not exactly mathematically gifted. In fact, I don't even know how to offset a character without using ksh97!

Help?
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0