-
Notifications
You must be signed in to change notification settings - Fork 35
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
Remote user missing if set through ssh_options #65
Comments
I guess the logic would have to be:
|
Thanks for the report! I don't quick understand what you mean in your third point: "fallback to local_user". Do you mean the equivalent of running I can definitely check the |
If no user is specified, sshkit uses either the user from Maybe there's a way to ask sshkit for the actual user it is going to use? |
The user is determined by net-ssh, which is the underlying library that SSHKit uses. If we had access to the net-ssh If you think there is a strong case to be made for logging the actual user (as implied by In the meantime, do you think checking for |
Yes I think it is. Falling back to the local user, if we're not sure it is actually correct is probably a bad idea… |
Up until now Airbrussh has displayed the username using `host.name`. However, this may be `nil` in favor of using `ssh_options[:user]`. Use the SSH options in this case. If for some reason no user is specified with either method, then omit the `@` symbol and just print the hostname instead of `@hostname`. Addresses #65.
Up until now Airbrussh has displayed the username using `host.name`. However, this may be `nil` in favor of using `ssh_options[:user]`. Use the SSH options in this case. If for some reason no user is specified with either method, then omit the `@` symbol and just print the hostname instead of `@hostname`. Addresses #65.
This is a bit tricker than I thought (see my failed attempt in PR #66), so I am going to put this on the back-burner for now. Addressing this issue means Airbrussh will have to make some assumptions about how net-ssh works, which makes me a little uncomfortable. @felixbuenemann if you want to take a stab at a PR I will consider merging it. |
Hmm, can't you access the global ssh_options from inside the formatter? |
@felixbuenemann I think my PR will work after all. Let's move the conversation over to #66. |
Up until now Airbrussh has displayed the username using `host.name`. However, this may be `nil` in favor of using `ssh_options[:user]`. Use the SSH options in this case. If for some reason no user is specified with either method, then omit the `@` symbol and just print the hostname instead of `@hostname`. Addresses #65.
Fixed by #66. This will be included in Airbrussh 0.8.0 (release date TBD). |
Released today in Airbrussh 0.8.0. |
Currently the remote user in the formatter is empty, if it's set in the ssh_options as opposed to in the server config:
This will display
@bar.com
insteadfoo@bar.com
for the remote user.The text was updated successfully, but these errors were encountered: