ssh auto login script
Hey, i need to login 400 users, and cause it would take quite some time loggin them in one by one by hand. I want to ask is there a script to auto login users over ssh/ or another protocol??
I have heard about keygen but then i would make to make a key for every user and that would take me forever. I only need to log them in once, so its not that i have to do it ever again. Is this possible?? |
Do you have to log in on the same machine? You could log in as root, and then use a bash script to loop over all your users, let them execute a specific script, and then quit.
Something like: $> for user in ( user1 user2 user3 ); do su - $user ls; done (this will make an "ls" for all users) Hope this helps |
yeah i could do that, can i provide a password with that, do you got an example script to pull this one off?
thx |
If you need a passwd as well, you may need the Expect tool, its designed to handle interactive stuff automatically.
|
Hey There,
Have you considered host-based authentication? It's not as secure as user key-based auth, but it would let you allow all trusted users from one server to log into your other one. Just a thought. Hope it helps :) , Mike |
All times are GMT -5. The time now is 08:43 PM. |