Disable Password from Server
sudo nano /etc/ssh/sshd_config
- Find
PasswordAuthentication
and set that to no
- Turn on
PubkeyAuthentication yes
- Turn off
ChallengeResponseAuthentication no
- Reload the SSH service
sudo systemctl reload sshd
- Test new user in a new tab to prevent getting locked out
Copy file/folder from server to server via ssh
- scp -r from_server to_server
scp -r [email protected]:/var/www/file.zip [email protected]:/var/www/
- if you want to copy file from server to your pc you can replace the distination
scp -r [email protected]:/var/www/file.zip .