add -r|--rsa-key option for answerback-email
[why] enable one click login testbox from jumper server
[how] add -r|--rsa-key option to enable generate rsa private/public key on jumper server register the public key to testbox
Signed-off-by: Luan Shengde shdluan@163.com --- container/assign-account/answerback-email.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/container/assign-account/answerback-email.rb b/container/assign-account/answerback-email.rb index 686a327..6d8e3de 100755 --- a/container/assign-account/answerback-email.rb +++ b/container/assign-account/answerback-email.rb @@ -32,7 +32,8 @@ my_info = { 'my_email' => nil, 'my_name' => nil, 'my_uuid' => %x(uuidgen).chomp, - 'my_ssh_pubkey' => nil + 'my_ssh_pubkey' => nil, + 'my_jumper_pubkey' => false }
def init_info(email_file, my_info) @@ -68,6 +69,10 @@ options = OptionParser.new do |opts| init_info(email_file, my_info) end
+ opts.on('-r', '--rsa-key', 'generate jumper ras public/private key and return pubkey') do + my_info['my_jumper_pubkey'] = true + end + opts.on_tail('-h', '--help', 'show this message') do puts opts exit @@ -114,10 +119,12 @@ def send_account(my_info) raise message if my_info['my_email'].nil?
account_info = apply_account(my_info) + # for manually assign account, there will be no my_commit_url # but the key my_commit_url is required for es my_info['my_commit_url'] = '' my_info['my_login_name'] = account_info['my_login_name'] + my_info['my_jumper_pubkey'] = account_info['my_jumper_pubkey'] my_info.delete 'my_ssh_pubkey' store_account_info(my_info) message = build_message(my_info['my_email'], account_info)
On Thu, Nov 12, 2020 at 10:11:26AM +0800, Luan Shengde wrote:
add -r|--rsa-key option for answerback-email
pub key is not necessarily RSA.
How about --gen-ssh-pubkey
[why] enable one click login testbox from jumper server
The deeper why: some people don't have local linux environment they'll use jumper server as main environment for job submit.
[how] add -r|--rsa-key option to enable generate rsa private/public key on jumper server register the public key to testbox
Signed-off-by: Luan Shengde shdluan@163.com
container/assign-account/answerback-email.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/container/assign-account/answerback-email.rb b/container/assign-account/answerback-email.rb index 686a327..6d8e3de 100755 --- a/container/assign-account/answerback-email.rb +++ b/container/assign-account/answerback-email.rb @@ -32,7 +32,8 @@ my_info = { 'my_email' => nil, 'my_name' => nil, 'my_uuid' => %x(uuidgen).chomp,
- 'my_ssh_pubkey' => nil
- 'my_ssh_pubkey' => nil,
- 'my_jumper_pubkey' => false
Dont add my_jumper_pubkey. Should reuse my_ssh_pubkey. my_ssh_pubkey can be made an array, and it should be excluded from ES mapping.
Thanks, Fengguang
On Thu, Nov 12, 2020 at 11:22:47AM +0800, Wu Fengguang wrote:
On Thu, Nov 12, 2020 at 10:11:26AM +0800, Luan Shengde wrote:
add -r|--rsa-key option for answerback-email
pub key is not necessarily RSA.
How about --gen-ssh-pubkey
OK, I will fix it
[why] enable one click login testbox from jumper server
The deeper why: some people don't have local linux environment they'll use jumper server as main environment for job submit.
I will add this part
[how] add -r|--rsa-key option to enable generate rsa private/public key on jumper server register the public key to testbox
Signed-off-by: Luan Shengde shdluan@163.com
container/assign-account/answerback-email.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/container/assign-account/answerback-email.rb b/container/assign-account/answerback-email.rb index 686a327..6d8e3de 100755 --- a/container/assign-account/answerback-email.rb +++ b/container/assign-account/answerback-email.rb @@ -32,7 +32,8 @@ my_info = { 'my_email' => nil, 'my_name' => nil, 'my_uuid' => %x(uuidgen).chomp,
- 'my_ssh_pubkey' => nil
- 'my_ssh_pubkey' => nil,
- 'my_jumper_pubkey' => false
Dont add my_jumper_pubkey. Should reuse my_ssh_pubkey. my_ssh_pubkey can be made an array, and it should be excluded from ES mapping.
yes, I will define my_ssh_pubkey as array to store pub-keys: - pub-key for login jumper - pub-key for login testbox
Thanks, Luan Shengde
Thanks, Fengguang
On Thu, Nov 12, 2020 at 11:31:22AM +0800, Luan Shengde wrote:
On Thu, Nov 12, 2020 at 11:22:47AM +0800, Wu Fengguang wrote:
On Thu, Nov 12, 2020 at 10:11:26AM +0800, Luan Shengde wrote:
add -r|--rsa-key option for answerback-email
pub key is not necessarily RSA.
How about --gen-ssh-pubkey
OK, I will fix it
Sorry, it's not only pubkey, but also private key. So --gen-sshkey
- 'my_ssh_pubkey' => nil,
- 'my_jumper_pubkey' => false
Dont add my_jumper_pubkey. Should reuse my_ssh_pubkey. my_ssh_pubkey can be made an array, and it should be excluded from ES mapping.
yes, I will define my_ssh_pubkey as array to store pub-keys:
- pub-key for login jumper
- pub-key for login testbox
Good. We'll be able to distinguish the keys, since the hostname will be embedded in the end of pubkey line by default.
Thanks, Fengguang
On Thu, Nov 12, 2020 at 11:36:13AM +0800, Wu Fengguang wrote:
On Thu, Nov 12, 2020 at 11:31:22AM +0800, Luan Shengde wrote:
On Thu, Nov 12, 2020 at 11:22:47AM +0800, Wu Fengguang wrote:
On Thu, Nov 12, 2020 at 10:11:26AM +0800, Luan Shengde wrote:
add -r|--rsa-key option for answerback-email
pub key is not necessarily RSA.
How about --gen-ssh-pubkey
OK, I will fix it
Sorry, it's not only pubkey, but also private key. So --gen-sshkey
OK, I got it
- 'my_ssh_pubkey' => nil,
- 'my_jumper_pubkey' => false
Dont add my_jumper_pubkey. Should reuse my_ssh_pubkey. my_ssh_pubkey can be made an array, and it should be excluded from ES mapping.
yes, I will define my_ssh_pubkey as array to store pub-keys:
- pub-key for login jumper
- pub-key for login testbox
Good. We'll be able to distinguish the keys, since the hostname will be embeddedq in the end of pubkey line by default.
OK.
Thanks, Luan Shengde
Thanks, Fengguang