by
29 7

fast-open of putty in current directory

fast-open of putty in current directory using Kitty and WinScp
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/105981/fast-open-of-putty-in-current-directory?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
Instead of having to create a new custom command and passing login information and -cmd on command line (of which unable to pass SSH keyfile and if user doesnt want to use pageant), here is a solution to re-use already existing "Open in PuTTy (Ctrl+J)" command which already passes information through registry. Following method will add "Autocommand" registry value as well to the other registry values that WinSCP already writes in "WinSCP Temporary Session". 1. Download kitty.exe (non-portable) into your WinSCP directory. 2. Create a file named kitty.ini with the following contents in your WinSCP directory. Modify initdelay depending on your connection speed. I found 6 seconds to be a good Autocommand delay to work across a variety of servers. [KiTTY] initdelay=6.0 3. Create an Autohotkey script named WinSCPLaunchKittyTempsession.ahk with the following contents that you then compile into WinSCPLaunchKittyTempsession.exe in your WinSCP directory. Pre-compiled script attached. Code: RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\9bis.com\KiTTY\Sessions\WinSCP`%20temporary`%20session, Autocommand, cd "%1%" Run, kitty.exe -load "WinSCP Temporary Session" 4a. In WinSCP, View>Preferences>Integration>Applications>Putty/Terminal Client Path: Code: WinSCPLaunchKittyTempsession.exe "!/" 4b. In WinSCP, View>Preferences>Integration>Applications>Putty Registry Key Code: Software\9bis.com\KiTTY 5. Now you can fast-open in current directory just with WinSCP>"Open in PuTTy" (in the commands menu, or Ctrl+P). No need to create a custom command. And it works with SSH keyfiles and all as well. WinSCPLaunchKittyTempsession.zip (242.68 KB) [Download] Description: WinSCPLaunchKittyTempsession.zip
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus