You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
268 B
13 lines
268 B
7 years ago
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
if [ ! -d ~/.ssh ]; then
|
||
|
mkdir ~/.ssh
|
||
|
chmod 700 ~/.ssh
|
||
|
ssh-keygen -t rsa -b 4096 -N "" -q -f ~/.ssh/id_rsa
|
||
|
ssh-keyscan localhost >> ~/.ssh/known_hosts
|
||
|
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||
|
chmod 600 ~/.ssh/authorized_keys
|
||
|
fi
|