Skip to main content
February 6, 2025
Solved

Is it possible to select the SSH Client I want to use for ssh:// entries?

  • February 6, 2025
  • 9 replies
  • 1247 views

The way my company uses 1Password is by creating entries for firewalls located at our clients.
Simple user and password entries that have the https and ssh links on them.

I use Xshell, and have whole environment over it with automations and color coding to help me do things faster.

What I need is just to be able to open XShell instead of Putty when I click ssh:// links inside 1Password.

I use Windows 11.

Best answer by floris_1P

We're working on better Windows support. This is what we currently have on the nightly channel (and soon in the beta too): you can choose between launching it with Windows Terminal (which uses wt.exe under the hood), which is the default, or you can specify a custom launch command. I don't have Xshell.exe installed myself, but you could try if this works:

 

9 replies

February 6, 2025

Have you checked the 1Password preferences? Under Developer -> Advanced, there's an option for "Open SSH URLs with: _________ "

pcorreiaAuthor
February 6, 2025

I don't have that option

February 6, 2025

You are correct. I just checked on my Windows 11 pc and it's different from my Mac. 

Have you checked the Windows 11 System Settings -> Apps -> Default Apps. See if putty is listed, there are the default option to open certain file types or urls types. I'm positive 1Password doesn't hardcode it (as I don't have putty and it opens ssh links fine) so it should be in a Windows setting.

pcorreiaAuthor
February 6, 2025

Unfortunately, whoever put putty as the default program for SSH didn't registered it in a way you can see over the default apps.
I'm scratching my head for days and still copying 1Password URL every time I want to access something.
Honestly, disapointed with 1Password nt  enabling you to select the app yourself, with Windows to allow a default app be registered outside the list and with Windows again for not letting me add the entry myself.

February 6, 2025

Yeah, that's unfortunate. If it's something that really bothers you and you have some time, I suggest looking into creating a custom protocol handler in Windows Registry Editor that opens Xshell when an ssh:// link is clicked. There should be articles and examples online.

pcorreiaAuthor
February 7, 2025

Ok, I managed to create a handler for ssh URLs.
But it looks like 1Password doesn't use that handler. So, a bit frustrated... I needed to know how 1Password calls an external program to SSH. Is it directly? Is it a different handler?

I'll paste the Reg file I created for the Xshell handler, it might be helpful for someone else.

Windows Registry Editor Version 5.00

[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 (x86)\\NetSarang\\Xshell 7\\Xshell.exe,0"

[HKEY_CLASSES_ROOT\telnet\shell]
@=""

[HKEY_CLASSES_ROOT\telnet\shell\open]

[HKEY_CLASSES_ROOT\telnet\shell\open\command]
@="\"C:\\Program Files (x86)\\NetSarang\\Xshell 7\\Xshell.exe\" %1"

[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 (x86)\\NetSarang\\Xshell 7\\Xshell.exe,0"

[HKEY_CLASSES_ROOT\ssh\shell]
@=""

[HKEY_CLASSES_ROOT\ssh\shell\open]

[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\Program Files (x86)\\NetSarang\\Xshell 7\\Xshell.exe\" %1"


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

[HKEY_CLASSES_ROOT\putty\DefaultIcon]
@="C:\\Program Files (x86)\\NetSarang\\Xshell 7\\Xshell.exe,0"

[HKEY_CLASSES_ROOT\putty\shell]
@=""

[HKEY_CLASSES_ROOT\putty\shell\open]

[HKEY_CLASSES_ROOT\putty\shell\open\command]
@="\"C:\\Program Files (x86)\\NetSarang\\Xshell 7\\Xshell.exe" -url %1"

 

September 29, 2025

Writing directly to HKEY_CLASSES_ROOT\ssh\shell\open\command is a very old school way of trying to handle the ssh protocol URLs.  More modern applications instead will declare themselves capable of handling them and register URL Associations for the types of URLs supported, then allow the 'Default Applications' to actually choose the application.  Windows, for good reason does not allow just any app take ownership of a protocol a different app was chosen for.

I know because I'm old school and I was recently banging my head against this particular brick wall.  The documentation is a bit difficult to find and a lot of examples you find online are outdated ones similar to the one above.  I went around in circles with ChatGPT before settling on the correct solution, but effectively it's this:

  1. Register your application under SOFTWARE\RegisteredApplications
  2. Create entries under HKLM\SOFTWARE\Clients\StartMenuInternet declaring capabilities and URL Associations
  3. Create entries under HKLM\Software\Classes\YourApplication for your application's DefaultIcon, shell\open\command, etc...
  4. Open windows 'default apps'  screen to let the user choose.  You cannot choose for them: exec "ms-settings:defaultapps?appid=<registeredAppName>"

 

From what I can tell, on Windows 11 at least, 1Password adheres to the windows default application for ssh pretty well.

kyanny
February 10, 2025

I have the same problem with macOS.

Recently 1Password started disrespecting the default URL scheme handler for ssh protocol.

I've set iTerm.app to the default URL scheme handler for ssh protocol, but when I click ssh:// link on a 1Password item, it opens Terminal.app to connect to the remote server via SSH.

Navigating ssh:// link from other app (for example, a hyperlink on the Obsidian markdown editor) opens iTerm.app as expected.

It appears that 1Password ignores the OS-level default handler configuration.

I use 1Password for Mac 8.10.60 through Production channel. I don't see the following option with my desktop app.

> Under Developer -> Advanced, there's an option for "Open SSH URLs with: _________ "

February 10, 2025

On Mac if you click Use the SSH Agent an "Advanced" box should appear

 

 

floris_1P
1Password Employee
February 12, 2025

Correct, you can have it open iTerm by going to Settings > Developer > Advanced > Open SSH URLs with: iTerm

 

floris_1P
floris_1PAnswer
1Password Employee
February 12, 2025

We're working on better Windows support. This is what we currently have on the nightly channel (and soon in the beta too): you can choose between launching it with Windows Terminal (which uses wt.exe under the hood), which is the default, or you can specify a custom launch command. I don't have Xshell.exe installed myself, but you could try if this works:

 

pcorreiaAuthor
February 12, 2025

First of all, I'm impressed to how quickly you manage to pull this up.
I don't know if it was my post or if it was part of the development path you guys were already on.

Either way, thank you!

Xshell -url %s

This is what I'm using and it works perfectly with only one detail.
It's not sending the login over the URL.
Is it possible to set the following on this command line?
Xshell -url [protocol://][user[:password]@]host[:port]

I know I might be asking for too much, I know.
Mainly because the ssh field usually already have the same info without the user and pass on it. That means parsing the field and you probably don't have some function in place to do that at this moment (and might never have).

Just face this as an extra that, if you manage to pull will make some people happy, but don't need to feel obligated to anything at this point.

THANK YOU!

floris_1P
1Password Employee
February 12, 2025

Happy to hear that it works! Docs are coming soon, but in the custom command field you can use %s to pass the full ssh:// URL as it is specified in the 1Password item, but you can also use %u, %h, %p for the user, hostname, and port, if you've specified those in the ssh:// URL in the 1Password item. We do not support passing down the password, however.

pcorreiaAuthor
February 12, 2025

Fair enough.

Thank you so much!

September 29, 2025

Here's a good link from Microsoft on how it's done:

https://learn.microsoft.com/en-us/windows/win32/shell/default-programs

If you want to see how my installer does it, you can get it below.  I recently added better support for 1Password SSH Keys, authentication agent,  SSH and SFTP URLs and proper 'default applications' handling under windows.

https://www.celestialsoftware.net