Desktop app caches SSH identity-file config in memory; doesn't reload ssh_configs.json until full restart
Summary
After editing a remote SSH connection's Identity File in the desktop app, the app keeps using the previous identity file until it is fully quit and relaunched. Closing the window / reconnecting is not enough.
Environment
- Claude desktop app on macOS
- Remote SSH connection feature (
RemoteServerController/SSH2Connection)
Steps to reproduce
- Configure a remote SSH host with identity file A (an OpenSSH-format ed25519 key).
- Connection fails to parse the key (see secondary bug below).
- Without quitting the app, change the Identity File to key B and save.
ssh_configs.jsonon disk updates correctly. - Reconnect.
Expected: App uses key B.
Actual: App keeps attempting key A. ssh.log shows attempts with the old key after ssh_configs.json was updated on disk, and never attempts key B. Only a full ⌘Q + relaunch makes the app pick up the new config.
Log evidence (paths/host redacted)
[SSH2Connection] Connecting ... (keys: 1[ssh-ed25519] ...)
[RemoteServerController] Connection failed: privateKey value does not contain a (valid) private key
— logged after ssh_configs.json had already been changed to a different key; zero attempts with the new key until restart.
Secondary bug (likely root trigger)
The underlying ssh2 library reports privateKey value does not contain a (valid) private key for an unencrypted OpenSSH-format ed25519 private key (-----BEGIN OPENSSH PRIVATE KEY-----) that is valid per ssh-keygen -y and authenticates fine with the system ssh client. Converting to an RSA PEM key (-----BEGIN RSA PRIVATE KEY-----) is what made it work. The app should either support OpenSSH-format ed25519 keys or surface a clearer error.
Workaround
Use an RSA PEM-format key, and fully quit/relaunch the app after changing the identity file.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗