Loooong-time no-post. Using 2025 R2 and all DB connections are over SSH. This works well for me, but setting up a co-worker, their Toad connections die overnight. Since other connections like SSH from a linux VM do not, that would seem to rule out network issues with home router, ISP, VPN, etc.
As near as we can tell, SQL*Net settings are the same (e.g. SQLNET.EXPIRE_TIME), so we were thinking maybe SSH config. Where does Toad grab SSH settings from? I was thinking of parameters like ServerAliveInterval, which we do have setup in ~/.ssh/config on the (Linux) SSH host, but unsure where Toad might be finding that locally. I have no config file in my local %USERPROFILE%/.ssh folder.
Is SSH configured within Toad or in some other app? If in Toad, you'd see a lock icon in the SSH button in the login window, and in that case, the SSH tunnel is established when the connection is made, and those settings are per-connection, stored in connections.xml.
If it's set up in some other app (putty/mobaXTerm, etc), we don't grab any settings at all, we just use whatever port is specified in tnsnames.ora and if the tunnel is open, we can use it.
We’re using the built-in SSH with Toad (soooo much easier!). There’s no lock icon, but I think that may have been a bug corrected in R3, maybe?
Due to ultrasupersecurity™ and a 3rd-party profile manager, I cannot access the Toad config files directly. Would that config show up in the resulting file from a connections export?
OR, I could have just done the export and looked at it myself. I see settings in the export for the fields shown in the “SSH” dialog on the connection screen, but no other options typical of an SSH (OpenSSH specifically) connection.
All the of the SSH settings that Toad uses are in connections.xml and the export file.
What other settings specifically are you looking for? I'm not sure offhand how we handle timeouts, etc. We use a 3rd party component compiled into Toad to do the SSH. Once I know what setting you're looking for, I could maybe expose it in Toad.
Update:
Here's a screen shot of some settings available on the 3rd party component. The default values are shown. Let me know if you'd like to be able to change any of these. IPV6 is selected automatically if the host name looks like an IPV6 value.
Ah, I believe that the TCPKeepAlive option is one of the things we’re looking for. It’s already selected and since my install seems to retain SSH connections over night, I’m thinking it’s something outside of Toad – possibly downstream. This gives me a direction to look!
Thinking back on the reason for this post, it’s because when Toad’s SSH connections get disconnected for whatever reason, a reconnect cannot work. It usually ends up with a “TNS: no listener” error, so all connections have to be dropped (along with editors, etc) and recreated. Thoughts? (feels like maybe a new thread)
Maybe there is a way I can detect when SSH is lost and then reconnect it, so that the DB connections can re-establish. I'll look into that and get back to you.
A possible workaround in the meantime - just make a new connection in Toad to whichever user@DB the SSH settings are on, without closing the old one first. Then you can close the old one (assigning editors and SB and whatever to the new connection if you want to). I'm not 100% that will work, but maybe.
Just to close this up for any future searches that end up here, DB connections from Toad using the builtin SSH do appear to be affected by the SSH configuration on the “Remote Host” (as shown in the SSH dialogue in a Toad DB connection). In retrospect, this should have been obvious, but I was fixated on the SSH configuration from the local host running Toad.
In particular, these parameters in the Remote Host’s .ssh/config file govern the idle timeout:
TCPKeepAlive
ServerAliveInterval
ServerAliveCountMax
TCPKeepAlive works at the TCP-level as the name suggests. Being there, it is subject to firewall rules and such, so is a little less useful to me.
The other two parameters work within the SSH protocol itself, so are not (or less likely?) impacted by firewall rules. A DB connection over SSH from Toad will be kept alive while idle for “ServerAliveInterval*ServerAliveCountMax” seconds. So if ServerAliveInterval is 120 and ServerAliveCountMax is 30, idle connections will be kept alive for 3600 seconds or 1 hour. Your mileage and settings may vary according to the SSH implementation.