Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PuTTY clients cannot select host to connect to #9

Open
mikechapman opened this issue Jan 2, 2016 · 8 comments
Open

PuTTY clients cannot select host to connect to #9

mikechapman opened this issue Jan 2, 2016 · 8 comments

Comments

@mikechapman
Copy link

It seems that sshmuxd is unable to accept keyboard input when using putty SSH client (w/ Pagaent). Under mac and linux (openssh) this seems to work fine. Odd.

@kennylevinsen
Copy link
Owner

Odd, but not impossibly weird. sshmux does rely a tiny bit on client behaviour, as the SSH protocol itself is extremely universal.

A few more details would be nice:

  • server selection shows up, but you can't input your selection, right?
  • does the log say anything?

@tomfanning
Copy link

Argh, this is so close to being perfect, then I run into this bug at the very last moment.

Symptoms exactly as you guessed, @Joushou, just no response to keyboard input.
Nothing in the log.

@ieth0
Copy link

ieth0 commented Apr 13, 2017

Same happening here on PuTTY,
Server selection shows up, no input being sent to the server ( sniffed using tcpdump )
Nothing in the PuTTY logs either, this is the last packet that I've got on PuTTY log:

Incoming packet #0xb, type 95 / 0x5f (SSH2_MSG_CHANNEL_EXTENDED_DATA)
00000000 00 00 01 00 00 00 00 01 00 00 00 1d 50 6c 65 61 ............Plea
00000010 73 65 20 73 65 6c 65 63 74 20 72 65 6d 6f 74 65 se select remote
00000020 20 73 65 72 76 65 72 3a 20 server:

@ieth0
Copy link

ieth0 commented Apr 14, 2017

I think you need to set Reply on AgentForwarding/PTY-Allocation/Shell-Request for clients like PuTTY and Bitvice...

@kennylevinsen
Copy link
Owner

@ieth0 Is that a client option that you are referring to?

@ieth0
Copy link

ieth0 commented Apr 14, 2017

I mean https://godoc.org/golang.org/x/crypto/ssh#Request.Reply
Just add
log.Printf("%s: %s %s\r\n", session.Conn.RemoteAddr(), session.User.Name, req.Type)
inside req in forward.go and you'll see PuTTY/Bitvise will stuck in pty-req/shell because of no Reply from our side.

@kennylevinsen
Copy link
Owner

kennylevinsen commented Apr 14, 2017

That's slightly trickier than a simple Reply, though, as those are proxied to the backend server upon connection. pty-req/shell reqs have side-effects, and the backend might refuse them.

It might be necessary to downgrade the transparency to get PuTTY to work by accepting pty-reqs... Hmmm. But then again, doesn't the new Win10 stuff let windows users use the real SSH client? :)

@ieth0
Copy link

ieth0 commented Apr 14, 2017

Im not big on windows stuffs, also I don't want to change my colleagues OS/tools they use. So I had to make this compatible with PuTTY too.
So far, by adding req.Reply(true, []byte{}) for pty-req || shell, PuTTY works too. I didn't see any problems.
Also Im working on exec req type, for ssh clients like ZoC which using exec on its jumpbox feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants