We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bbe8ab commit 5bfa244Copy full SHA for 5bfa244
user_creation_and_ssh_key_configuration
@@ -8,7 +8,7 @@ Adding_Users () {
8
sudo useradd $1
9
sudo mkdir /home/$1/.ssh
10
sudo chown $1:$1 /home/$1/.ssh ; sudo chmod 700 /home/$1/.ssh
11
- sudo cd /home/$1/.ssh && sudo ssh-keygen -t rsa -N "" -f /home/$1/.ssh/id_rsa 2>/dev/null
+ sudo ssh-keygen -t rsa -N "" -f /home/$1/.ssh/id_rsa 2>/dev/null
12
sudo chown $1:$1 /home/$1/.ssh/id_rsa ; sudo chown $1:$1 /home/$1/.ssh/id_rsa.pub
13
sudo touch /home/$1/.ssh/authorized_keys ; sudo cp /home/$1/.ssh/id_rsa.pub /home/$1/.ssh/authorized_keys ; sudo chmod 600 /home/$1/.ssh/authorized_keys
14
sudo chown $1:$1 /home/$1/.ssh/authorized_keys
0 commit comments