SSH Block not working

Just discovered the Desktop app, and absolutely loving it!

One thing that I don’t seem to be able to get to work is the SSH block.

It simply throws up the error ‘Disconnected’ without any further details.

See a screenshot below.

Worth saying that g_web is defined in my ~/.ssh/config file as follows, and I’d log in via private key

Host g_web
  Port 2020
  HostName [ip redacted]
  User [redacted]

Are you able to help me?

Welcome to the forum! Thank you for reporting this

Frustratingly, I’m unable to replicate this with a similar setup

If you were to put

username@hostname:2020

into the SSH block instead of just g_web, does it work then?

Thanks @ellie !

No, using that notation doesn’t work either.

Worth noting that I’m actually connecting via IP address rather than hostname.

Is there anyway to get a hold of the actual error message?

If you run it from the cli (/Applications/Atuin.app/Contents/MacOS/atuin-desktop on mac, distro-depending for linux) you will get more logs.

I’m also unable to replicate any issues with specifying an IP + port (with auth via ssh key), so hopefully the logs reveal something! We’ll be sorting proper logfiles soon which should make this better.

Thanks again @ellie!

I was finally able to retry from the cli and here is the output:

[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::pool] Creating new SSH connection for root@[ip redacted]:2020
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::session] Resolved SSH config for [ip redacted]:2020: hostname=[ip redacted], port=2020, username=Some("nanos"), identity_files=[], proxy_command=None, proxy_jump=None
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::session] Connecting directly to: [ip redacted]:2020
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::session] SSH authentication as root (config username: Some("nanos"))
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::session] Found 0 keys in SSH agent
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::session] No SSH agent keys worked for authentication
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh::session] No explicit authentication method provided, tried SSH agent and config identity files
[2025-10-06T06:09:24Z DEBUG atuin_desktop::runtime::ssh_pool] Opening PTY for 0199b823-98b2-7e56-bcb1-67a41079bd1b
[2025-10-06T06:09:24Z ERROR atuin_desktop::runtime::ssh_pool] Failed to open PTY: Disconnected

    Location:
        src/runtime/ssh/session.rs:587:27

Just one comment on this: I’ve tried adding IdentityFile ~/.ssh/id_rsa to the relevant entry in my ~/.ssh/config file, but that made no difference to the output.

I’m having similar issues on a Mac, maybe Atuin Desktop is not reading ~/.ssh/config ?

workflow_serial command receivedrunning workflow: [Terminal(Terminal { id: 85fd2664-0abb-454d-b835-98b6715caf0e, name: “Terminal 1”, code: “ls”, output_visible: true })]inserting workflow into store: 0199e5bf-ece1-7402-866d-93a2f2dbed81serial workflow: [Terminal(Terminal { id: 85fd2664-0abb-454d-b835-98b6715caf0e, name: “Terminal 1”, code: “ls”, output_visible: true })]running block: Terminal(Terminal { id: 85fd2664-0abb-454d-b835-98b6715caf0e, name: “Terminal 1”, code: “ls”, output_visible: true })emitting start block event 85fd2664-0abb-454d-b835-98b6715caf0eblock 85fd2664-0abb-454d-b835-98b6715caf0e startedblock 85fd2664-0abb-454d-b835-98b6715caf0e started[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::pool] Creating new SSH connection for YYYYY@XXX.XX.XX.XXX:22[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::session] Resolved SSH config for XXX.XX.XX.XXX:22: hostname=XXX.XX.XX.XXX, port=22, username=Some(“YYYYY”), identity_files=, proxy_command=None, proxy_jump=None[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::session] Connecting directly to: XXX.XX.XX.XXX:22[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::session] SSH authentication as YYYYY (config username: Some(“YYYYYY”))[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::session] Found 0 keys in SSH agent[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::session] No SSH agent keys worked for authentication[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh::session] No explicit authentication method provided, tried SSH agent and config identity files[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh_pool] Opening PTY for 0199e5c6-ac5b-7659-ab74-98b8a52cd04f[2025-10-15T02:50:26Z ERROR atuin_desktop::runtime::ssh_pool] Failed to open PTY: Disconnected

Location:
    src/runtime/ssh/session.rs:587:27

[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh_pool] Removing dead SSH connection after PTY failure: YYYYYY@XXX.XX.XX.XXX:22[2025-10-15T02:50:26Z DEBUG atuin_desktop::runtime::ssh_pool] SshPool Message handled[2025-10-15T02:50:27Z DEBUG atuin_desktop::workspaces::manager] Handling 2 file events for workspace 0199e5bf-d1de-76f1-bf6c-d8bd8d8627f8[2025-10-15T02:50:27Z DEBUG atuin_desktop::workspaces::manager] Processing relevant event: Modify(Metadata(Any)) for paths: [“/Users/YYYYYY/projects/atuin runbooks/Test Remote SSH.atrb”][2025-10-15T02:50:27Z DEBUG atuin_desktop::workspaces::manager] Processing relevant event: Modify(Data(Content)) for paths: [“/Users/YYYYYY/projects/atuin runbooks/Test Remote SSH.atrb”]

Are you both using an ssh agent? We only support auth via an agent at the moment so that’s worth a try

Doesn’t macOS run an ssh agent by default? I haven’t set one up manually, but yes, one is running.

FWIW, after a system reboot the other day, the SSH block started working in Atuin. (Sorry, I should’ve posted here!) So maybe the ssh-agent wasn’t running (properly) without me noticing?

@agraves worth trying a reboot?

Glad it started working!!

Depending on setup you might need to run ssh-add ~/path/to/private-key to add the key to your agent

I have never been able to get the SSH block to work either. I have this in my `~/.ssh/config`:

Host server
  HostName 1.2.3.4
  User user

Then:

  • I have one key added to the SSH agent (it shows when I do `ssh-add -l`);
  • When I ssh to a host from the terminal or from an Atuin terminal, it connects;
  • If I remove the key with `ssh-add -D`, then it fails from the Atuin terminal because it can’t ask for the passphrase, and from a regular terminal it asks for my passphrase, which proves that the key in the agent is the right one to connect;
  • Running a script after the SSH block doesn’t do anything, and the logs from running Atuin from the terminal show (datetime and logger removed for readability, but it’s `[atuin_desktop_runtime::ssh::session]`:
[INFO] Starting SSH authentication for user@1.2.3.4
[INFO] Step 1/4: Trying SSH agent authentication
[INFO] Attempting SSH agent authentication for ubuntu
[INFO] Using default SSH agent from environment
[INFO] SSH agent has 1 keys available
[INFO] No SSH agent keys worked for authentication
[INFO] ✗ SSH agent authentication failed or unavailable
[INFO] Step 2/4: Trying SSH config identity files (0 files)
[INFO] Step 3/4: Trying default SSH keys (1 keys found)
[INFO] Attempting public key authentication with /Users/user/.ssh/id_rsa
[WARN] Failed to load key /Users/user/.ssh/id_rsa: The key is encrypted
[INFO] Step 4/4: Trying explicitly provided authentication
[WARN] All SSH authentication methods exhausted
[WARN] Tried: SSH agent, 0 config keys, 1 default keys

One can see that there is indeed one key in the agent. We know that it’s the right one, but it says it didn’t work. Then it tries the same key from the filesystem, which fails because it has a passphrase.

If I remove the passphrase from my private key, the relevant log shows:

[INFO] Step 2/4: Trying SSH config identity files (1 files)
[INFO] Attempting public key authentication with /Users/user/.ssh/nopass
[WARN] Server rejected key /Users/user/.ssh/nopass (remaining methods: MethodSet([PublicKey]), partial: false)

Obviously, the same thing done in the terminal works flawlessly, and I double-checked with verbose logging that it’s indeed the `nopass` key that’s being used to connect.

I’m a bit at a loss. Is there something else I can test to get a better idea

Update: I looked at the SSH server logs, and I noticed that it display an “invalid user” error, with my local username. So Atuin is not honouring the `User` setting from my `.ssh/config`.

If I change the SSH block to `user@server`. it now connects, but only with the passphrase-less filesystem SSH key. The default SSH agent still fails, and so does the 1Password agent.

I just merged a fix for this, and it will be out soon! Thank you for investigating + reporting

Still unclear what’s happening here as I haven’t been able to replicate. If it persists after the next update please let me know