-
Notifications
You must be signed in to change notification settings - Fork 21
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
Accept ed25519 and other common SSH Keys #200
Conversation
Fixes #199 |
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.
This only works for letter only types, but there are other big ones (ed25519)
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.
proxstar/static/js/script.js
Outdated
@@ -223,7 +223,7 @@ $("#create-vm").click(function(){ | |||
const max_cpu = $(this).data('max_cpu'); | |||
const max_mem = $(this).data('max_mem'); | |||
const max_disk = $(this).data('max_disk'); | |||
var ssh_regex = new RegExp("ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?") | |||
var ssh_regex = new RegExp("ssh-[a-z]+ AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?");; |
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.
Two semicolon?
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 was in the original
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.
Cool
@@ -223,7 +223,7 @@ $("#create-vm").click(function(){ | |||
const max_cpu = $(this).data('max_cpu'); | |||
const max_mem = $(this).data('max_mem'); | |||
const max_disk = $(this).data('max_disk'); | |||
var ssh_regex = new RegExp("ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?") | |||
var ssh_regex = new RegExp("ssh-[a-z0-9]+ AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?"); |
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.
this won't match security keys created with a hardware auth key (yubikey, solokey, etc)
#199 Here you go @jabbate19
Updated the regex expression to accept other common ssh keys besides RSA