Jump to content
Pugna

[Bash]SSH Shell Access Checker

Recommended Posts

Posted

Daca vrei sa folosesti sintaxa asta

sshpass -p [COLOR="#FF0000"]'$pass'[/COLOR] ssh $user@$host -o StrictHostKeyChecking=no -N -D 127.0.0.1:8899 &

Va trebui sa scoti ghilimelele de la variabila $pass

Asta este sintaxa corecta de altfel clientul nu va autentifica userul cu parola

sshpass -p [COLOR="#00FF00"]$pass[/COLOR] ssh $user@$host -o StrictHostKeyChecking=no -N -D 127.0.0.1:8899 &

Urmatoare sintaxa va functiona intotdeauna daca userul nu are o restrictie de shell

sshpass -p $pass ssh $user@$hosti "echo 2>&1" && echo "OK" || echo "KO"

Posted

Da foarte dragut utilitarul , singura problema este ca ... eu nu mi-as lasa clear password in niste scripturi pe server , mai ales ca parolele sunt de la alte remote hosts....

Oricum bine de tinut minte....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...