<< Back to Script Library

SSH to a Computer

Location of putty.exe, Computer IP and Username must be provided. Password is optional and a better recommendation is use a authorized key saved in putty’s default settings (https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter8.html)
You can download from https://www.putty.org
Version: 2.8.37
Created: 2019-04-22
Modified: 2019-07-18
Creator: mc
Downloads: 61
Tags: $IPAddresses=.* $Name $OperatingSystem $OperatingSystem=*Linux*
The Script Copy Script Copied to clipboard
@ECHO OFF
cd %1

set argC=0
for %%x in (%*) do Set /A argC+=1


IF [%argC%] EQU [3]  (
       ECHO Password not provided - recommended to use an authorized key in the default settings for Putty
       start putty.exe %2@%3
       exit
       )

       ECHO 4th parameter detected, using password as %3 and IP as %4
       start putty.exe %2@%4  -pw %3
exit