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

Popular posts from this blog

javascript - How to bind ViewModel Store to View? -

recursion - Can every recursive algorithm be improved with dynamic programming? -

c - Why does alarm() cause fgets() to stop waiting? -