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

use go modules #67

Closed
wants to merge 1 commit into from
Closed

use go modules #67

wants to merge 1 commit into from

Conversation

qiangli
Copy link

@qiangli qiangli commented Sep 21, 2018

add gitignore
remove vendor folder
work around crypto/ssh handshake issue by locking to an old commit

add gitignore
rmove vendor folder
work around crypto/ssh handshake issue by locking to an old commit
@jpillora
Copy link
Owner

Thanks! Hopefully will find some time soon to test

@jpillora
Copy link
Owner

Hi, sorry for the delay! I haven't been able to test yet, though thought I'd check first: what was the crypto/ssh handshake issue?

@qiangli
Copy link
Author

qiangli commented Oct 18, 2018

It could be related to golang/go#21941
I never had time to debug deeper as it works with a lower commit. Here are the steps to reproduce:

  1. check out this pull request anywhere on your local machine (as it uses modules and does not need to reside in $GOPATH/src)
  2. upgrade crypto/ssh in go.mod with: go get golang.org/x/crypto, you should see changes similar to the following:
  •   golang.org/x/crypto v0.0.0-_20170825_220121-81e90905daef
    
  •   golang.org/x/crypto v0.0.0-**20181015**023909-0c41d7ab0a0e
    
  1. do a build: go build and run
    ./chisel server
    ./chisel client -v http://localhost:8080 localhost:6022:localhost:22
    (client will hang at: client: Handshaking...)

and
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 6022 $USER@localhost
will fail with the following error:
ssh_exchange_identification: Connection closed by remote host

@jpillora
Copy link
Owner

jpillora commented Oct 18, 2018 via email

@jpillora
Copy link
Owner

jpillora commented Oct 18, 2018 via email

@jpillora
Copy link
Owner

Found it

golang/crypto@5f55bce#diff-97976acd222484d4e11fa2a89268d611R354

Now, the SSH version string must contain SSH- otherwise handshake hangs

@jpillora
Copy link
Owner

Did a full re vendor to get all the updates. So I didn't end up using your commit, though thanks for debugging and the PR! Checkout the 1.2.4 release!

@jpillora jpillora closed this Oct 20, 2018
@qiangli qiangli deleted the go111module branch October 20, 2018 16:50
@qiangli
Copy link
Author

qiangli commented Oct 20, 2018

Cool, now that you have identified the root problem. Thanks for your great work!

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

Successfully merging this pull request may close these issues.

2 participants