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

ssh: Windows session stdio oddities #7353

Closed
gopherbot opened this issue Feb 18, 2014 · 4 comments
Closed

ssh: Windows session stdio oddities #7353

gopherbot opened this issue Feb 18, 2014 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by larzconwell:

What steps will reproduce the problem?

http://play.golang.org/p/R4f6bPP2RM
1. Replace constants so you can connect to a ssh server.
2. Run the code.
3. Once connected, try to type a command.

What is the expected output?

Output from given commands.

What do you see instead?

No command output, and the prompt is repeated multiple times on the same line.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g.

Which operating system are you using?

Windows.

Which version are you using?  (run 'go version')

go version go1.2 windows/amd64.

It also makes a sound every time the prompt is displayed, not sure if it's related but I
thought I should mention it.
@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 1:

Labels changed: added repo-crypto, release-none.

@hanwen
Copy link
Contributor

hanwen commented Apr 12, 2014

Comment 2:

have you tried removing the RequestPty call? I believe the remote end may be sending you
control codes for an XTerm terminal, which windows doesn't understand.
If you need to interpret terminal codes, you can try using the ssh/terminal package,
requesting a VT100 terminal.
(we should probably have an example for this.)

@gopherbot
Copy link
Contributor Author

Comment 3 by larzconwell:

So if the terminal isn't set to raw mode with terminal.MakeRaw() it doesn't print any
command output. 
If it is in raw mode the output is correct, just with a ton of ASCII sequences. Which
can be easily filtered out.

@agl
Copy link
Contributor

agl commented May 10, 2014

Comment 4:

I think this is just down to the fact that terminals are really confusing. Not sure
there's a Go bug here.

Status changed to Invalid.

@mikioh mikioh changed the title code.google.com/p/go.crypto/ssh: Windows session stdio oddities ssh: Windows session stdio oddities Jan 8, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants