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

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -