Skip to content

Commit

Permalink
Made corrections to -I configuration on SSHI and added a default _Use…
Browse files Browse the repository at this point in the history
…rName_ var to the alias default alias.cmd file.
  • Loading branch information
GaryLBaird committed Jul 21, 2017
1 parent 41f3f58 commit d78f3a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions CLHelper.bat
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ SET LocalFile=%USERPROFILE%\.ssh\authorized_keys
SET SSHDIR=/home/%USE_THIS_USER%/.ssh
FOR /D %%i in (!__MACHINES__!) do (
ECHO connecting to server
%CommandLineHelper%\bin\OpenSSH\bin\ssh.exe %USE_THIS_USER%@%%i -i %USERPROFILE%\.ssh\id_rsa
%CommandLineHelper%\bin\OpenSSH\bin\ssh.exe %USE_THIS_USER%@%%i -I %USERPROFILE%\.ssh\id_rsa
)
ENDLOCAL
:LinuxDone
Expand Down Expand Up @@ -374,7 +374,7 @@ REM REM Begin Test Connections Script
FOR /D %%i in (!__MACHINES__!) do (
ECHO.
ECHO Attempting to connect to %%i and validate it is working properly.
%CommandLineHelper%\bin\OpenSSH\bin\ssh.exe !USE_THIS_USER!@%%i -i %USERPROFILE%\.ssh\id_rsa
%CommandLineHelper%\bin\OpenSSH\bin\ssh.exe !USE_THIS_USER!@%%i -I %USERPROFILE%\.ssh\id_rsa
)
ENDLOCAL
:LinuxDoneSetupSSH
Expand Down Expand Up @@ -897,7 +897,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION
FOR /D %%A IN (%__GOSERVER__%) DO (
ECHO._________________________________________________________________________________
ECHO Connecting to Linux Server: %%A.%_MyDomainOrWorkgroup_%
IF NOT DEFINED _DEBUG_ START ssh gary@%%A.%_MyDomainOrWorkgroup_% -i %userprofile%\.ssh\id_rsa
IF NOT DEFINED _DEBUG_ START ssh %_MyUserName_%@%%A.%_MyDomainOrWorkgroup_% -I %userprofile%\.ssh\id_rsa
ECHO._________________________________________________________________________________
)
ENDLOCAL
Expand All @@ -908,7 +908,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION
FOR /D %%A IN (%__LINUX_SERVERS__%) DO (
ECHO._________________________________________________________________________________
ECHO Connecting to Linux Server: %%A.%_MyDomainOrWorkgroup_%
IF NOT DEFINED _DEBUG_ START ssh %_MyUserName_%@%%A.%_MyDomainOrWorkgroup_% -i %userprofile%\.ssh\id_rsa
IF NOT DEFINED _DEBUG_ START ssh %_MyUserName_%@%%A.%_MyDomainOrWorkgroup_% -I %userprofile%\.ssh\id_rsa
ECHO._________________________________________________________________________________
)
ENDLOCAL
Expand Down
3 changes: 2 additions & 1 deletion scripts/cmd/alias.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SET _CLHScripts_=c:\CommandLineHelper\Scripts
SET _CLHBIN_=c:\CommandLineHelper\bin
SET _READWRITEINI_=%_CLHScripts_%\vbs\readwriteini.vbs
SET CLHelper=%_CLHScripts_%\CLHelper.bat
SET _USERNAME_=%username%

::Create Default Directories
IF NOT EXIST "%_CLHScripts_%\vbs" (
Expand Down Expand Up @@ -75,7 +76,7 @@ DOSKEY ls=%CLHelper% --ls $*
DOSKEY vjson=%CLHelper% --JsonCheck $*
DOSKEY rdp=%CLHelper% --RDP $*
DOSKEY window=%CLHelper% --mode $*
DOSKEY sshi=%_CLHBIN_%\OpenSSH\bin\ssh.exe %_USERNAME_%@$1 -i %USERPROFILE%\.ssh\id_rsa
DOSKEY sshi=%_CLHBIN_%\OpenSSH\bin\ssh.exe %_USERNAME_%@$1 -I %USERPROFILE%\.ssh\id_rsa
::Custom Alias Directory
SET _CustomAliasDir_=C:\dev\scripts
::Custom Alias Create If Missing
Expand Down

0 comments on commit d78f3a8

Please sign in to comment.