Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I want to do it without using authorized_keys file. I should be able to ssh to any server using this script where my account exists. I am writing this script to run only in my home network where all of our friends work together on linux for expermentation purpose. Just want to save time typing passwords and without using authorized_keys :-)
I am not expected to use this file in my office. Is there anyway the BASH can simulate the entering of password when ssh prompts for a password?
I mean to ask, Can i write a script such that I can detect some program waiting (ssh prompting for input in this case) and simulate the key strokes and an 'Enter' at the end :-) Is such a script possible to write?
The general answer to your question is to use "expect". Keys are a better way to go.
Also look at the "ssh-agent" program. Using it you will only have to enter your passphrase once. Using authorized-keys with passphrases and agent is the most secure method according to the ssh manpages.