Last active
May 22, 2019 01:49
-
-
Save paddy74/8dced8ad0300cf0facebd8e654c7b590 to your computer and use it in GitHub Desktop.
Set up ssh authentication with a server from user side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Please enter the user@hostname | |
read userhost | |
ssh-keygen -t ecdsa -b 521 | |
echo Please reenter the file in which to save the key plus .pub | |
read pubfile | |
ssh-copy-id -i pubfile userhost | |
eval 'ssh-agent' | |
ssh-add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
chmod 700 ~/.ssh | |
chmod 644 ~/.ssh/id_*.pub | |
chmod 600 ~/.ssh/id_* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment