Ssh config and/or agent getting cached?
Hi all! I have a weird question that could probably apply to any IntelliJ-based IDE.
I have a remote host that frequently changes its name, so I have a script to automatically update my ~/.ssh/config file and swap out this dynamic HostName in a statically named Host directive. It works great, but the issue I'm facing is that I have to restart PyCharm in order for the new config to get picked up. More specifically, I can immediately start an ssh terminal (within Pycharm and outside) with the new config, but my remote host configs won't work unless i restart pycharm.
This is more of an annoyance than a critical problem, but I'm just curious if anyone knows how/whether pycharm is caching this ssh config and/or agent and/or session is there anyway to refresh it?
请先登录再写评论。
Hello, Gamis.
Please add the
#com.intellij.ssh
line to theHelp | Diagnostic Tools | Debug Log Settings
window, restart the IDE, reproduce the problem again, and collect the IDE logs (Help | Collect Logs and Diagnostic Data
). Please share the logs archive with us via the JetBrains Uploads service and write me the ID you receive. I want to check if there are any relevant entries in the logs.Thanks for your help! I didn't feel comfortable uploading all the logs. Upload id: 2025_03_05_XwxbmZq3uCCPrXQEri9mLv (file: idea.log) has idea.log just since I started my remote host this morning. Seems that I can connect the python console ok but it's the rsync-base deployment that fails. Not sure if that's an issue with rsync in particular, just thought I'd point that out.
Thank you for sharing the logs and sorry for the delay with reply. I'll ask the responsible developer to take a look as it is not clear to me why exactly the connection is not established successfully.
Thank you for your patience.
Could you please make sure there is no typo in the SSH config file or in the IDE settings of your SSH connection? From the logs you shared, it seems that the SSH config is not updated correctly, probably because of the reasons I mentioned above.
Thanks, olga. If it were a typo, why would restarting pycharm fix the problem?
Unfortunately, we weren't able to find any other reasons yet. The responsible developer will take a look at the problem again and will try to reproduce the problem according to the description you provided. I'll let you know once we have any updates for you.