Only need set my_ssh_pubkey, lkp-test/daemon/sshd use my_ssh_pubkey to set authorized_keys.
Signed-off-by: Wu Zhende wuzhende666@163.com --- src/lib/job.cr | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 6f81172..a4402ab 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -192,16 +192,14 @@ class Job
return if @account_info["found"]? == false
- update_sshd + set_my_ssh_pubkey end
- private def update_sshd + private def set_my_ssh_pubkey sshd = @hash["sshd"].as_h? || Hash(String, JSON::Any).new() pub_key = sshd["pub_key"]?.to_s update_account_my_pub_key(pub_key)
- sshd["pub_key"] = @account_info["my_ssh_pubkey"] - @hash["sshd"] = JSON.parse(sshd.to_json) @hash["my_ssh_pubkey"] = @account_info["my_ssh_pubkey"] end