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

Fix errata in nc option in nixops ssh into deployed container on remo… #559

Closed
wants to merge 1 commit into from

Conversation

wavewave
Copy link

…te machine.

When connecting a remote container via nixops ssh, the following error happened.

$  nixops ssh -d query query 
nc: invalid option -- 'c'
usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length]
          [-P proxy_username] [-p source_port] [-q seconds] [-s source]
          [-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol]
          [-x proxy_address[:port]] [destination] [port]
ssh_exchange_identification: Connection closed by remote host
query> could not connect to ‘root@mark.uphere.he~10.233.1.2’, retrying in 1 seconds...

This was because -c option should be -C. This pull request fixed the issue and I have tested that nixops ssh works well.

Copy link
Member

@aszlig aszlig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to NixOS/nixpkgs#19411 and also please note that -c on GNU netcat is not the same as -C of the OpenBSD version.

GNU netcat: -c close connection on EOF from stdin
OpenBSD netcat: -C Send CRLF as line-ending.

@thufschmitt
Copy link
Member

I think the correct option would be -q0 for OpenBSD netcat

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

Successfully merging this pull request may close these issues.

None yet

4 participants