Skip to content
Snippets Groups Projects
Commit 3518ee99 authored by Bob Mottram's avatar Bob Mottram
Browse files

Quotes

parent 1713d292
No related branches found
No related tags found
No related merge requests found
......@@ -32,14 +32,14 @@ fi
if [ "$SSH_PUBLIC_KEY" ]; then
if [ ${#SSH_PUBLIC_KEY} -gt 5 ]; then
if [ -f $SSH_PUBLIC_KEY ]; then
if [ -f "$SSH_PUBLIC_KEY" ]; then
mkdir /home/$MY_USERNAME/.ssh
cp $SSH_PUBLIC_KEY /home/$MY_USERNAME/.ssh/authorized_keys
echo 'ssh public key installed'
else
if [[ $SSH_PUBLIC_KEY == "ssh-"* ]]; then
if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
mkdir /home/$MY_USERNAME/.ssh
echo $SSH_PUBLIC_KEY > /home/$MY_USERNAME/.ssh/authorized_keys
echo "$SSH_PUBLIC_KEY" > /home/$MY_USERNAME/.ssh/authorized_keys
echo 'ssh public key installed'
else
echo 'The second parameter does not look like an ssh key'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment