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

bosh ssh non-interactive and control sockets don't play well #345

Closed
darth-hp opened this issue Oct 27, 2017 · 4 comments
Closed

bosh ssh non-interactive and control sockets don't play well #345

darth-hp opened this issue Oct 27, 2017 · 4 comments

Comments

@darth-hp
Copy link

darth-hp commented Oct 27, 2017

When using eg ControlMaster auto (reusable ssh sessions) on all hosts Host *, bosh shows an error:
process_mux_new_session: tcgetattr: Inappropriate ioctl for device
This behavior is due to the nature that ssh wants to keep a control session running even after it got disconnected but bosh expects ssh to end.

Two workarounds I found:

a) Try to exclude IP addresses from the environment in the users ssh config before Host *

# Don't use control sockets for IP addresses (simplified match)
Host *.*.???.* *.*.??.* *.*.?.*
  ControlMaster no

Of course you could have the IP addresses in your match like 192.168.*.* but if you don't know them for whatever reason above may be appropriate.

b) Pass in a ssh option for bosh

bosh -e vbox -d cf ssh --opts " -o ControlMaster=false" uaa/0 -c 'ls -l /'

I believe it should be standard for the cmdOpts in https://github.com/cloudfoundry/bosh-cli/blob/master/ssh/session.go since this ssh sessions will never be reused

Option b) doesn't work with scp since that doesn't accept options.

@cppforlife
Copy link
Contributor

Option b) doesn't work with scp since that doesn't accept options.

you mean scp command in bosh doesn accept --opts, not that scp doesnt respect ControlMaster=false?

cc @evanfarrar @cunnie @coreyti

@darth-hp
Copy link
Author

darth-hp commented Feb 4, 2018

At least not when I opened that issue

@bosh-admin-bot
Copy link

This issue was marked as Stale because it has been open for 21 days without any activity. If no activity takes place in the coming 7 days it will automatically be close. To prevent this from happening remove the Stale label or comment below.

@bosh-admin-bot
Copy link

This issue was closed because it has been labeled Stale for 7 days without subsequent activity. Feel free to re-open this issue at any time by commenting below.

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

No branches or pull requests

3 participants