WinSSHTerm - does it work with Teleport? #45040
-
Hi, Here is a YouTube video that shows how to manually set up certificates to launch PuTTY and WinSCP. For use with Teleport, a proxy ("Local") has to be configured too afaik. There is a migration tool available, which should automatically create a connection file for WinSSHTerm and migrate all relevant settings from the PuTTY sessions generated by Teleport. I'd be glad if someone could check it out and confirm if it works, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
Hey - I tried to run the migration tool and got an error: P-St/Migrate2WinSSHTerm#13 I'll be happy to test things if it's possible to fix that error. Thanks! Edit: now fixed! |
Beta Was this translation helpful? Give feedback.
-
OK, now I've got the migration tool working, I ran it and it generated a The connections load OK, but when I attempt to load a session to connect through Teleport, I get an error: "X11 forwarding is not enabled": The session halts at this point and I cannot access the server. This error is being passed back from Teleport, which does not allow X forwarding by default. As such, the PuTTY sessions it creates don't have X forwarding enabled when created either. It seems that out of the box, WinSSHTerm expects this to be enabled by default? If I manually edit the "Config" of the connection to set "don't forward" next to "X11 forward", things work as expected: Debugging info
<?xml version='1.0' encoding='utf-8'?>
<WinSSHTerm Version='1'>
<Node Name='Sessions' Type='Container' Expanded='True'>
<Node Name='ip-172-31-30-140%20(proxy:teleport.example.com)' Type='Connection' Descr='' Username='ubuntu' Password='' PrivateKey='C:\Users\gus\.tsh\keys\teleport.example.com\webvictim.ppk' Hostname='ip-172-31-30-140' Port='3022' Certificate='C:\Users\gus\.tsh\keys\teleport.example.com\webvictim-ssh\purple-cert.pub' pSshProxy='enabled' pType='Local' pHost='teleport.example.com' pPort='0' pUser='ubuntu' pTelnetCmd='C:\\Windows\\tsh.exe proxy ssh --cluster=purple --proxy=%proxyhost %user@%host:%port' />
<Node Name='ip-172-31-8-63%20(proxy:teleport.example.com)' Type='Connection' Descr='' Username='ubuntu' Password='' PrivateKey='C:\Users\gus\.tsh\keys\teleport.example.com\webvictim.ppk' Hostname='ip-172-31-8-63' Port='22' Certificate='C:\Users\gus\.tsh\keys\teleport.example.com\webvictim-ssh\purple-cert.pub' pSshProxy='enabled' pType='Local' pHost='teleport.example.com' pPort='0' pUser='ubuntu' pTelnetCmd='C:\\Windows\\tsh.exe proxy ssh --cluster=purple --proxy=%proxyhost %user@%host:%port' />
</Node>
</WinSSHTerm> Screenshot of the |
Beta Was this translation helpful? Give feedback.
-
I also tried to use the "Copy Files" button on the connection to invoke WinSCP, but unfortunately that doesn't work: I suspect this is because WinSCP is not being told to import the SSH Host CAs set in the PuTTY registry keys when it's invoked. You can see under step 5 in the docs here that Teleport requires that checkbox enabled for seamless connections: https://goteleport.com/docs/connect-your-client/putty-winscp/#using-winscp-to-transfer-files-over-sftp This is to save users from having to manually re-import their SSH Host CA configuration, which are also automatically generated and written to PuTTY's registry key when running |
Beta Was this translation helpful? Give feedback.
-
Thanks for testing!
Right, X11 forwarding is enabled by default for all connections in WinSSHTerm by changing the session parameter in the registry. A way to get around this would be to adapt the migration script to turn off X11 forwarding for each migrated connection - if the session was created by Teleport. Maybe a simple substring check for "tsh.exe" in the proxy telnet command would be a good way to identify Teleport. What do you think?
That shouldn't be the case, because WinSSHTerm will force this by using the command line parameter When you click on "Copy files" and the WinSCP windows pops up, you can see all command line parameters for WinSCP (and PuTTY) by opening up a PowerShell terminal and enter this command:
With my test connection, this will ouput something like this for WinSCP:
The output might give a hint on what's going wrong here. Could you share it? |
Beta Was this translation helpful? Give feedback.
Hi - I can confirm that with WinSSHTerm 2.37.2 and Migrate2WinSSHTerm 0.20, everything works fine out of the box!