fix ssh for ubuntu 22.04

This commit is contained in:
mercury
2023-02-18 00:35:57 +04:00
parent 9166011608
commit 4cb700f772
8 changed files with 19 additions and 8 deletions
+2
View File
@@ -1,4 +1,6 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys
echo 'HostKeyAlgorithms +ssh-rsa' >> /etc/ssh/sshd_config
echo 'PubkeyAcceptedKeyTypes +ssh-rsa' >> /etc/ssh/sshd_config
service ssh start
sed -n "s/\"server_port\": \([0-9]\+\),/\1/p" /config.json > current_port
CURRENT_PORT=$(cat current_port | tr -d " ")