Spaces:
Sleeping
Sleeping
Download app/templates/ssh_key_setup.j2 from shakauthossain/deploymate: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/spaces/shakauthossain/deploymate/resolve/main/app/templates/ssh_key_setup.j2
- Command line
-
hf download hf://spaces/shakauthossain/deploymate/app/templates/ssh_key_setup.j2
-
curl -L -o ssh_key_setup.j2 https://huggingface.co/spaces/shakauthossain/deploymate/resolve/main/app/templates/ssh_key_setup.j2
382 Bytes
| # SSH key setup script | |
| # Generate SSH key pair | |
| ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" | |
| # Copy public key to authorized_keys | |
| cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys | |
| chmod 600 ~/.ssh/authorized_keys | |
| # Disable password authentication | |
| sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
| sudo systemctl restart sshd |