Wednesday 14 February 2018

linux - Log in using SSH without password


On my server, I've got openssh-server and a special account without password. I'm creating a shell script, that must be used without user input. For example


$(ssh dummyUser@dummy.com)

I need script to end after signing in. How to do it? (I know about authorised keys).



Answer



Account with no password is quite dangerous. Try to use key authorization like that:


$(ssh -u dummyUser -i keyfile dummy.com /path/to/the/some_script_on_the_dummy_com.sh)

And remember that for unattended login your keypair should not be protected by password.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...