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
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();
}