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