Thursday, June 27, 2013

Launch SSH connections like RDP

I'm a sysadmin for a living, primarily dealing with UNIX and Windows servers.  Seeing as there's an everyday requirement to cross between these two platforms I've tried many solutions to better manage the connection process. I don't like any of them, and I'd much prefer to just launch a connection to a server when needed, do what's required, then exit.

To achieve this I'll use mstsc /v server_name to connect via RDP to a Windows Server, or Putty to connect to a UNIX or Linux server. Establishing Putty connections take too long so I sought for a shortcut similar to mstsc from the run dialog box, here's a quick and easy solution:

1) Modify your PATH variable
* Right click Computer and select Properties
* Select Advanced System Settings on the left pane
* Click the Advanced tab
* Click Environment Variables
* Select Path from System  Variables and click Edit
* At the end of the Variable value field add ;Your_Path_To_Putty
* Click OK and close the system properties window

2) Add a putty shortcut
* Browse to your putty path
* Right Click > New > Shortcut
* Enter the path to putty followed by -ssh (eg. C:\Putty\putty.exe -ssh)
* Click Next
* Enter a shortcut name of ssh and click Finish
* Right click your new shortcut and select Properties
* Select the Shortcut tab
* Change the Run dropdown box to reflect Maximized

Now bring up the run dialog box and type ssh server_name. If you followed along, Windows should launch a putty SSH session to your server.

No comments:

Post a Comment