diff --git a/quick-connect.bat b/quick-connect.bat index 26aceaf5c24355d8c0033dff84fa0a42b61af5b9..926791f43e3eb03e12d7a8cd2b5fd0d00478b839 100644 --- a/quick-connect.bat +++ b/quick-connect.bat @@ -1,11 +1,15 @@ -@echo off -call az config set core.login_experience_v2=off -call az login +@ECHO OFF -if exist "C:\Users\%username%\.ssh\csctcloud\" ( +REM can we check here if az has a valid token and skip? +CALL az config set core.login_experience_v2=off +CALL az login + +IF EXIST "C:\Users\%username%\.ssh\csctcloud\" ( del /q "C:\Users\%username%\.ssh\csctcloud" rmdir "C:\Users\%username%\.ssh\csctcloud" ) -call az ssh config --ip csctcloud.uwe.ac.uk --file "C:\Users\%username%\.ssh\config" --keys-destination-folder "C:\Users\%username%\.ssh\csctcloud" -call code -n --remote ssh-remote+csctcloud.uwe.ac.uk \ No newline at end of file +REM can we check here if certificate is still valid and/or if config has entry, and skip? (or combination of this?) +CALL az ssh config --ip csctcloud.uwe.ac.uk --file "C:\Users\%username%\.ssh\config" --keys-destination-folder "C:\Users\%username%\.ssh\csctcloud" + +CALL code -n --remote ssh-remote+csctcloud.uwe.ac.uk \ No newline at end of file