Jump to content
Pugna

[Bash]SSH Shell Access Checker

Recommended Posts

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"

Link to comment
Share on other sites

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...