diff --git a/src/components/ssh-control.vue b/src/components/ssh-control.vue index e717f84..f0198b5 100644 --- a/src/components/ssh-control.vue +++ b/src/components/ssh-control.vue @@ -27,39 +27,18 @@ export default { methods: { openUrl() { if (this.value) { - window.open(`ssh:${this.value}`, "ssh"); + //case 4663: ssh://root@host is the form OpenSSH understands; "ssh:host" (the PuTTY-era link) is not + window.open(`ssh://root@${this.value.trim()}`, "ssh"); } } } }; /* -TO USE THIS: -Must have a SSH URI handler set in registry on windows to open putty like this: +TO USE THIS (case 4663): Windows must open ssh:// links in Windows Terminal, which runs Windows' own OpenSSH +(it uses the keys in the KeePassXC SSH agent). The registry handler, under HKEY_CLASSES_ROOT\ssh\shell\open\command: ----------------- -Windows Registry Editor Version 5.00 + "C:\Users\\AppData\Local\Microsoft\WindowsApps\wt.exe" ssh "%1" -[HKEY_CLASSES_ROOT\ssh] -@="URL:SSH Protocol" -"URL Protocol"="" - -[HKEY_CLASSES_ROOT\ssh\DefaultIcon] -@="%%ProgramFiles%%\\PuTTY\\putty.exe" - -[HKEY_CLASSES_ROOT\ssh\shell] - -[HKEY_CLASSES_ROOT\ssh\shell\open] - -[HKEY_CLASSES_ROOT\ssh\shell\open\command] -@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -Command \"$val='%l'; $val = $val.TrimEnd('/');if ($val.StartsWith('ssh://')) { $val = $val.SubString(6) };if ($val.StartsWith('ssh:')) { $val = $val.SubString(4) }; & 'C:\\Program Files\\PuTTY\\putty.exe' \"$val\"\"" - - ----------------- - -Also in putty need to set default to use pagent agent and then open the keys in KeePass so relies on a lot specific to us but it works great -https://documentation.help/PuTTY/config-saving.html#S4.1.2 - - -C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "$val='%l'; $val = $val.TrimEnd('/');if ($val.StartsWith('ssh://')) { $val = $val.SubString(6) };if ($val.StartsWith('ssh:')) { $val = $val.SubString(4) }; & 'C:\Program Files\PuTTY\putty.exe' "$val"" +plus the "URL Protocol" value on HKEY_CLASSES_ROOT\ssh so the browser offers it. */