It is currently Fri May 25, 2018 1:07 am

ssh script

All times are UTC - 6 hours

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Tue Jun 23, 2009 1:37 pm   

Joined: Mon Jan 12, 2009 7:13 am
Posts: 2
Location: Univ. of Conn.
Hi All - I'm trying to make a script where the user enters their username and password for a remote computer cluster and the script logs into the computer and does some stuff. Now.... I've done this successfully but needed to set up RSA keys on the desktop machine and computer clutster. Ultimately i plan to use extended basic to create a GUI to run this script and then I plan on distributing the GUI. Because I'm distributing the GUI I obviously cant set up RSA keys for all possible machines and because the GUI runs the script is can't be interactive. Is there any other was to ssh into the cluster using the password as an argument of the script? Essentially I need a one-liner linux bash command to ssh into the cluster and automatically enter the password. I thought maybe

ssh [email protected] | password

would work but no such luck. Any help is much appreciated.

 Profile WWW  
 PostPosted: Tue Jun 23, 2009 11:28 pm   
User avatar

Joined: Sat Jun 13, 2009 8:53 pm
Posts: 73
Location: Texas!
I'm not sure I perfectly understand your situation, but as far as using ssh-keygen, you don't want to use that because users will need to login to the cluster computers from, say, a public or home machine where storing the key isn't feasible/secure? Otherwise, it would be quite easy to do that.

Unfortunately, I cannot think of any easy one-liner way to supply a password to ssh, and the best info I found on line was this: It's a bit of work, but it could do what you want. If you want to implement that and need any help, just let us know.

On the other hand, would it really be so bad to have a shell pop up and prompt for a password?

 PostPosted: Thu Jul 23, 2009 12:27 pm   
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 273
Perl has an ssh library that allows you to put the user/pass into the script. Using keys is the only bash option I can think of, unless you want to script it in somthing like 'expect'.

 Profile YIM  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours

Who is online

Users browsing this forum: No registered users and 8 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group