Comments on: Putty as ssh:// url handler /2009/07/11/putty-as-ssh-url-handler A collection of note-to-self's Sun, 24 Mar 2019 23:04:45 +0000 hourly 1 https://wordpress.org/?v=5.1.1 By: tovog /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-247102 Mon, 23 Feb 2015 18:28:02 +0000 http://blog.dest-unreach.be/?p=1041#comment-247102 I’m sorry, I haven’t it read properly. I used only putty-telnet-url-handler.reg without your ‘proxy’ miniapp.

]]>
By: Niobos /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-246967 Fri, 20 Feb 2015 07:15:45 +0000 http://blog.dest-unreach.be/?p=1041#comment-246967 togov, then how did you get it to work in the first place? I only provide the C-code…

]]>
By: tovog /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-246933 Thu, 19 Feb 2015 15:40:55 +0000 http://blog.dest-unreach.be/?p=1041#comment-246933 Thank you for reply,
but I cannot compile anything, I’m not a SW developer.

]]>
By: Niobos /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-246922 Thu, 19 Feb 2015 07:32:22 +0000 http://blog.dest-unreach.be/?p=1041#comment-246922 Can you recompile with the fprint() statements uncommented (and probably also the sleep() call, so you have time to see what happens)? That will show in more detail what the wrapper program receives as arguments.

]]>
By: tovog /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-246905 Wed, 18 Feb 2015 19:12:55 +0000 http://blog.dest-unreach.be/?p=1041#comment-246905 Hallo,
can you please help me with launching PuTTY via URL handler?
I installed putty-telnet-url-handler.reg and reedited registry to destination “C:\Program Files (x86)\PuTTY\PUTTY.EXE”.
If I click onto ssh://user@IP, error message is PuTTY:”Unable to open connection to IP/, Host does not exist”. Where did the slash ‘/’ came from?
I also tried to create telnet registry entry – telnet://user@IP >> PuTTY launches OK.
If I remove ‘user’ – ssh://IP, after several seconds the console appears, but connecting to http://www.esys.sk. Where did the address came from?
I found also other files.reg in the internet to handle ssh://, almost the same.
The problem is probably somewhere in settings MS Windows 8.1, but I don’t know where.

I’d be very happy You helped me.

]]>
By: Niobos /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-119950 Wed, 19 Dec 2012 13:13:03 +0000 http://blog.dest-unreach.be/?p=1041#comment-119950 Hi John,

I did find a bug in the code which doesn’t look like it’s immediately related, but it might. I also added an additional `fprint` line just above the get_putty_cmd() call. Can you uncomment that and post its output? That log-line will tell you how the ssh-to-putty program understood its command line.

]]>
By: John /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-119818 Tue, 18 Dec 2012 17:45:37 +0000 http://blog.dest-unreach.be/?p=1041#comment-119818 Hi,

me again… I compiled it using tcc ( http://bellard.org/tcc/ )

It works fine if I do:

C:\John\tcc>.\ssh-to-putty ssh://login@hostname
Running: “C:\Program Files\PuTTY\putty.exe” -ssh login@hostname

But I found that if I call it using a port (e.g. ssh://login@hostname:22)

then the cmd string gets corrupted.

It somehow loses the space after the port number, and the @ sign in the user@hostname gets replaced with the 3rd character of the login name.

C:\John\tcc>.\ssh-to-putty ssh://login@hostname:22
Running: “C:\Program Files\PuTTY\putty.exe” -ssh -P 22loginghostname

C:\John\tcc>.\ssh-to-putty ssh://abc@hostname:22
Running: “C:\Program Files\PuTTY\putty.exe” -ssh -P 22abcchostname

C:\John\tcc>.\ssh-to-putty ssh://abcd@hostname:22
Running: “C:\Program Files\PuTTY\putty.exe” -ssh -P 22abcdchostname

C:\John\tcc>.\ssh-to-putty ssh://abcde@hostname:22
Running: “C:\Program Files\PuTTY\putty.exe” -ssh -P 22abcdechostname

I’ve hacked around on it and found that the whole get_putty_cmd function is somehow very touchy.
If I comment out the whole if(port){…} then it breaks for all URLs, whether they have they port or not.

If I use an array instead of a pointer for cmd I can get behave more sensibly, but I’ve not got it working quite how I’d like it yet!

]]>
By: John /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-119050 Fri, 14 Dec 2012 19:57:16 +0000 http://blog.dest-unreach.be/?p=1041#comment-119050 If you’re having trouble calling PuTTY.exe with a space in the path, this works:

cmd = “\”C:\\Program Files\\PuTTY\\putty.exe\” -ssh “;

]]>
By: Felix /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-1506 Wed, 26 Aug 2009 08:17:26 +0000 http://blog.dest-unreach.be/?p=1041#comment-1506 Nice work!

Two notes:
1) I had to add the directory that contains putty.exe and ssh-to-putty.exe to the PATH variable to make it work. Before that, ssh-to-putty could not find putty, even though both files were located in the same directory.
2) It would be nice if the ssh-to-putty window would close after starting putty.

Anyway, thank you very much 🙂

Best regards
Felix

]]>
By: Niobos /2009/07/11/putty-as-ssh-url-handler/comment-page-1#comment-1464 Tue, 28 Jul 2009 16:03:49 +0000 http://blog.dest-unreach.be/?p=1041#comment-1464 Bjørn,

I agree. But since putty is normally downloaded as a simple .exe without installer, there is no default installation path. Also, editing a text-file is not very hard.

Niobos

]]>