Good day! I am trying to launch a SecureCRT session from a Microsoft Excel macro, but am running into an issue with regard to the session connecting successfully. It is opening SecureCRT, but then is spitting out an error:
"Hostname lookup failed: host not found"
' Enter credentials in custom form
strPassword = passkey
strUsername = username
'host and protocol
strProtocol = "ssh2"
strHostname = "host.com"
' Reference the SecureCRT script file to be run upon launch
Set fso = CreateObject("Scripting.FileSystemObject")
strScriptFile = "C:\Users\filepath\script.js"
' Open SecureCRT and run script with login creds.
Set objShell = CreateObject("wscript.shell")
nResult = objShell.Run( _
"SecureCRT /SCRIPT " & strScriptFile & _
" /arg " & strHostname & _
" /arg " & strUsername & _
" /arg " & strProtocol & _
" /PASSWORD " & strPassword, _
Can someone please provide some insight? There is very little reference material for this out there.
Thank you for your time!