Posts

Showing posts with the label Putty

Create A Batch File Or Shortcut To PuTTY (ssh) That Opens A Session And Runs A Command

Image
Answer : Use the commandline PuTTY version plink.exe to initate a SSH connection to a host of choice. Use the -ssh switch to connect with SSH. With the -m switch you can include a command file: plink.exe -ssh host1 -m C:\path\to\commands.txt You can download plink.exe from here. Last step would be to create a shortcut including plink.exe with the desired parameters. Check out the Plink documentation for other various parameters: Plink.exe documentation To automate a command execution, use Plink (from PuTTY package), not PuTTY itself. Plink accepts a command on its command line: plink.exe user@host command If you want to keep using PuTTY, you can use -m switch to specify a command file (Plink supports the -m switch too). You can use putty configurations to achieve this. Load putty and configure your session. Enter the remote command that you'd like to run here: Then, before clicking " Open ", go back to the " Session " tab (at the top), and save your co...

A Putty Shortcut That Automatically Launches A Profile?

Answer : From the Putty FAQ: To run a PuTTY session saved under the name ‘mysession’, create a Windows shortcut that invokes PuTTY with a command line like \path\name\to\putty.exe -load "mysession" ---EDIT--- In Windows 7, the shortcut has to be in quotes like this: "\path\name\to\putty.exe" -load "mysession" I had referred to Putty Connection Manager as a useful addon, giving one click connects and tabbed windows, but it seems the app is dead and all the files removed from the hosting site. While checking into this, I found a fork of the project, called superputty (see below) and a reference to KiTTY - a Win32 native version of PuTTY with extra features so here you go: Superputty:https://github.com/jimradford/superputty KiTTY: http://kitty.9bis.com/ In windows use this target for putty shortcut, for save username and password. Then load a saved session or add to Task Manager: "C:\Program Files\PuTTY\putty.exe" -load ...