"fix" is used when some bug is found, so here can use change.
On Wed, Nov 25, 2020 at 02:39:27PM +0800, Zhang Yale wrote:
[why]
- "my_ssh_pubkey" field is a collection of all pub_keys submitted by users.
- We can save all the pub_keys submitted by users in the ES database
and password-free login.
style: "and" should be aligned with "We", it has been agreed before.
- Therefore, users can sometimes borrow a machine to test without
providing a pub_key.
ditto.
Thanks, Xijian
Signed-off-by: Zhang Yale ylzhangah@qq.com
daemon/sshd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/daemon/sshd b/daemon/sshd index a3fdf954..c7d7b60c 100755 --- a/daemon/sshd +++ b/daemon/sshd @@ -1,5 +1,5 @@ #!/bin/sh -# pub_key +# my_ssh_pubkey # my_email # sshr_port # sshr_port_len @@ -14,10 +14,10 @@ sshr_ip=$LKP_SERVER
run_ssh() {
- [ -n "$pub_key" ] || return
- [ -n "$my_ssh_pubkey" ] || return umask 0077 mkdir -p /root/.ssh
- echo "$pub_key" > /root/.ssh/authorized_keys
- echo "$my_ssh_pubkey" > /root/.ssh/authorized_keys systemctl start sshd
}
@@ -73,11 +73,11 @@ compose_email()
set_port() {
- [ -n "$pub_key" ] || return
[ -n "$my_ssh_pubkey" ] || return
for i in $(seq 1 10) do
port=$(($(date +%s%N)%${sshr_port_len}+${sshr_port_base}))
ssh -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -o TCPKeepAlive=yes \ -Nf -R $port:localhost:22 sshr@"$sshr_ip" -p "$sshr_port" &>/dev/null [ $? -eq 0 ] && returnport=$(($(date +%s%N)%$sshr_port_len+$sshr_port_base))
-- 2.23.0