-
Notifications
You must be signed in to change notification settings - Fork 9
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: enable empty password login for all users #16
Open
arighi
wants to merge
1
commit into
main
Choose a base branch
from
enable-empty-password-login
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be sure: is it OK to do that with "system" users? e.g. the ones having
nologin
orfalse
for the shell.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You raised a valid point... even with localhost only another user might be able to ssh into the guest, potentially having access to data that was only visible to the user that started the vng instance.
So this change seems to have security implications and it's probably safer to stick with the public key authentication.
I'll think more about this, but I'm more inclined to drop this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. But then, do we not have the same issue with the VSOCK option? :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any cases, we should restrict the SSH connection to localhost only by default I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any kind of permission restriction with vsock? If not we should mention it in the README or the help.
Maybe we should consider vsock a quick (but potentially unsafe) way to connect to the vng instance and if you need better security use ssh.
And yes, we definitely need to restrict access to localhost only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have some restrictions with the current code "by accident": when starting the VM, an empty script file will be created (by default
/tmp/virtme-console/2222.sh
) and only the current user can modify it. So we can connect to the vsock, but nothing will happen apart from executing an empty script. Looks enough, no?If we want something more secure, it looks like QEmu can take a Unix socket in argument in order not to have the CID accessible to everybody on the machine (via
/dev/vhost-vsock
), but I didn't really find a lot of documentation about that, except this Rust VMM project that seems to be using a Unix socket. Do you think it is worth investigating? It feels like what we have for the moment is enough.Now regarding SSH, maybe warning the user in the README/help menu is enough for the moment?