Can we connect and send commands in Putty | Selenium Forum
M
Posted on 08/07/2016
Hi,
I am not getting sufficient material on connection with PUTTY.
I am trying to automate task to connect to putty via selenium and send commands.
Is it possible ?

M
Replied on 08/07/2016

Selenium WebDriver is used for browser automation testing (hence the name WebDriver), so calling PuTTY, database, WinSCP are slightly out of scope for it.

Source: http://stackoverflow.com/questions/29484968/putty-automation-using-selenium-webdriver


M
Replied on 12/07/2016

Actually we can send commands in putty by using
commands

String command = "putty.exe -ssh root@******yourserver********.com -pw yourpassword -m stopPreAuth.txt";

Runtime rt = Runtime.getRuntime();
try {
rt.exec(command);
Thread.sleep(6000);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}