case 4663 - subscription server ssh link opens ssh://root@server in Windows Terminal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,39 +27,18 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
openUrl() {
|
openUrl() {
|
||||||
if (this.value) {
|
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:
|
TO USE THIS (case 4663): Windows must open ssh:// links in Windows Terminal, which runs Windows' own OpenSSH
|
||||||
Must have a SSH URI handler set in registry on windows to open putty like this:
|
(it uses the keys in the KeePassXC SSH agent). The registry handler, under HKEY_CLASSES_ROOT\ssh\shell\open\command:
|
||||||
|
|
||||||
----------------
|
"C:\Users\<you>\AppData\Local\Microsoft\WindowsApps\wt.exe" ssh "%1"
|
||||||
Windows Registry Editor Version 5.00
|
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\ssh]
|
plus the "URL Protocol" value on HKEY_CLASSES_ROOT\ssh so the browser offers it.
|
||||||
@="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""
|
|
||||||
*/
|
*/
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user