0

I have created a menu for users to select from to ssh into whatever device they selected. This is used my the Engineers that manage these devices. Right now it when they select the device they want to login into, the script will login in and have a prompt for the password to be entered. What I would like for it to do is have a file that the script can go to, to pull the correct password to the device they selected and auto enter the password. All in all at the end, the user selects the device they want to ssh to from the menu and it logs them in without entering the password manually. Any easy suggestions?

1 Answer 1

1

You should add more details to your question (which os, which language is the "menu" written in) but if you're already willing to put your passwords into a file you could try this:

Use ssh key files instead of passwords. It is possible to have a key file which is not secured by a password itself (although not advisable).

Generate a key file for every user (it's also possible to use the same key file for every user), put it in (if the os is unix based most likely) ~/.ssh and add the key id on the server to $userhome/.ssh/.authorized_keys

You'll then be able to login without a prompt for the password (this has to be enabled in the ssh-server configuration, but on current systems it is activated by default)

Here's a HOWTO: http://sshkeychain.sourceforge.net/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .