3
Is there a way to automatize SSH connection (so the script could connect without prompting for password) if the server does not allow using keys?
3
Is there a way to automatize SSH connection (so the script could connect without prompting for password) if the server does not allow using keys?
5
if keys are not allowed on the server (which is .. strange) then you want the ssh-client to read the password from stdin .. which brings us to
https://stackoverflow.com/questions/1340366/how-to-make-ssh-receive-the-password-from-stdin
0
You can do this with putty:
For unix, create a file, paste the below command in, chmod 755
putty -ssh ServerNameOrIP -l UserName -pw Password
for windows, you can use vbscript like so:
Dim ShellRun
Set ShellRun = WScript.CreateObject("WScript.Shell")
ShellRun.Run """C:\Program Files\PuTTY\putty.exe"" -ssh ServerNameOrIP -l UserName -pw Password", 1
I use personally use "expect", which is the unaccepted answer there. – frabjous – 2011-01-25T20:56:28.530