Guest User

Untitled

a guest
Dec 14th, 2017
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. putty.exe -ssh user@host -pw password -m c:pathcommand.txt
  2.  
  3. plink.exe -ssh user@host -pw password -m c:pathcommand.txt > output.txt
  4.  
  5. plink.exe -ssh user@host -pw password command > output.txt
  6.  
  7. bash -c "ssh -t user@computer 'cd /; sudo my-command'"
  8.  
  9. ECHO OFF
  10. CLS
  11. :MENU
  12. ECHO.
  13. ECHO ........................
  14. ECHO SSH servers
  15. ECHO ........................
  16. ECHO.
  17. ECHO 1 - Web Server 1
  18. ECHO 2 - Web Server 2
  19. ECHO E - EXIT
  20. ECHO.
  21.  
  22. SET /P M=Type 1 - 2 then press ENTER:
  23. IF %M%==1 GOTO WEB1
  24. IF %M%==2 GOTO WEB2
  25. IF %M%==E GOTO EOF
  26.  
  27. REM ------------------------------
  28. REM SSH Server details
  29. REM ------------------------------
  30.  
  31. :WEB1
  32. CLS
  33. call ssh user@xxx.xxx.xxx.xxx
  34. cmd /k
  35.  
  36. :WEB2
  37. CLS
  38. call ssh user@xxx.xxx.xxx.xxx
  39. cmd /k
Add Comment
Please, Sign In to add comment