Reputation: 5
I keep getting a Error Expected statement. Code 800A0400. Line 1, char 1. What am I doing wrong?
My code,
# $language = "VBScript"
# $interface = "1.0"
' Connect to an SSH server using the SSH2 protocol. Specify the
' username and password and hostname on the command line as well as
' some SSH2 protocol specific options.
Sub Main
Dim host
host = "ssh.google.com"
Dim user
user = "userinfo"
' Prompt for a password instead of embedding it in a script...
'
Dim passwd
passwd = crt.Dialog.Prompt("Enter password for " & host, "Login", "", True)
' Build a command-line string to pass to the Connect method.
'
cmd = "/SSH2 /L " & user & " /PASSWORD " & passwd & " /C 3DES /M MD5 " & host
crt.Session.Connect cmd
End Sub
Upvotes: 0
Views: 1065
Reputation: 38745
The "comment to end of line" marker in VBScript is the single quote '
, not #
. So change
# $language = "VBScript"
# $interface = "1.0"
to
' $language = "VBScript"
' $interface = "1.0"
(Other possible problems: do you call Sub main? Where does crt come from?)
Upvotes: 2