KiTTY icon indicating copy to clipboard operation
KiTTY copied to clipboard

Starting Kitty from browser hyperlink

Open MadTomT opened this issue 1 year ago • 1 comments

Hi, I've followed the guide here https://www.9bis.net/kitty/index.html#!pages/SSHHandler.md and it does work.

I've setup my hyperlink as SSH

When I click the link I am connected to the correct local server.

Is it possible when Kitty tries to connect to this server it can see there is already a profile for 192.168.0.1 and then it would use the configuration I already have setup ? ie: for this server I have auto login and password set and a command to run when connected.

Thanks

MadTomT avatar Mar 06 '25 09:03 MadTomT

This might be possible, by editing the Registry Values supplied in the "kitty_ssh_handler.reg" File, linked below.

https://www.9bis.net/kitty/files/kitty_ssh_handler.reg

If you look at the very last Registry Key/Value Entry, you'll see that the Registry Value contains the "-load" Parameter.

[HKEY_CLASSES_ROOT\putty\shell\open\command]
@="\"C:\\Program Files\\KiTTY\\kitty.exe\" -load \"%1\""

That being said, I'm thinking that you may possibly be able to use a similar method on the Shell Open Command for the equivalent Telnet or SSH Registry Entry, etc.

However, instead of using the Server URL or IP Address, in the "telnet://" or "ssh://" Link, you would use the Kitty Session Name (unless the Session Name is the Server URL or IP Address, of course).

Telnet Registry Key/Value:

[HKEY_CLASSES_ROOT\telnet]
@="URL:Telnet Protocol"
"EditFlags"=dword:00000002
"FriendlyTypeName"="@ieframe.dll,-907"
"URL Protocol"=""
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\telnet\DefaultIcon]
@="C:\\Program Files\\KiTTY\\kitty.exe,0"

[HKEY_CLASSES_ROOT\telnet\shell]
@=""

[HKEY_CLASSES_ROOT\telnet\shell\open]

[HKEY_CLASSES_ROOT\telnet\shell\open\command]
@="\"C:\\Program Files\\KiTTY\\kitty.exe\" -load \"%1\""

Telnet Link Format:

<a href="telnet://<Kitty Session Name>">telnet://<Kitty Session Name></a>

SSH Registry Key/Value:

[HKEY_CLASSES_ROOT\ssh]
@="URL:SSH Protocol"
"EditFlags"=dword:00000002
"FriendlyTypeName"="@ieframe.dll,-907"
"URL Protocol"=""
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\ssh\DefaultIcon]
@="C:\\Program Files\\KiTTY\\kitty.exe,0"

[HKEY_CLASSES_ROOT\ssh\shell]
@=""

[HKEY_CLASSES_ROOT\ssh\shell\open]

[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\Program Files\\KiTTY\\kitty.exe\" -load \"%1\""

SSH Link Format:

<a href="ssh://<Kitty Session Name>">ssh://<Kitty Session Name></a>

I'll try to test this theory out, when I have some free time to do so.

mrmattipants avatar May 26 '25 04:05 mrmattipants