security - Is it safe to type password when scripting commands via ssh? -
i've seen handy command query distant database local machine:
ssh user@server 'mysql -uimauser -ppassword imadb -e "select * table"'
but wonder how safe is? can capture password? if how?
i'm aware works too:
ssh user@server 'mysql -uimauser -p imadb -e "select * table"'
but automation purpose, prefer first solution (if safe of course). i've tried capture password ps didn't see (my knowledge of ps poor).
Comments
Post a Comment