Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am wondering how I can automatically make an ssh key with like a script or something. I know ssh -t dsa will make me a key but I need to have it done automatically so I can create a new key every 24 hours or so and run the script in the cron.
ohh ok I made a mistake upthere. I know the command to make a new key is ssh-keygen -t dsa but when i do that I have to physically press enter on the keyboard about 3 times and I need it to be automated. Like I need it to be in a script
I have no idea why I need to make a new key every 24 hours. I do some volunteer work for a computer company and they asked me to look into it. I googled but found nothing so I am coming here and asking to see if anybody knows.
Ok so now if I use ssh-keygen -N "" -t dsa it works but I still have to hit enter to accept where it's going to save to. Is there anyway around that?
I think they want new keys so often because they think ssh can be hacked easily and if they make new keys every 24 hours, it will prevent that from happening since they have never worked with ssh before. Thats what I think but they won't say anything
Krugger: while I always forget about expect, do you see any significant advantage to the expect script over my single command above? I'm not challenging your results, just wondering what I am missing.
Actually I think your way is better. I already had the thread opened and I don't think your post was there yet we posted pretty close to each other. (30 minute differance)
I just use expect and send because it doesn't make you read too many man pages for the options.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.