Skip to content

Commit 3d1b304

Browse files
committed
Fix SSH error
1 parent 795582b commit 3d1b304

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

oobe.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ function import_ssh_keys {
136136
echo $KEY | sudo tee -a /home/clab/.ssh/authorized_keys > /dev/null
137137
;;
138138
False*)
139-
powershell.exe -NoProfile -Command "ssh-keygen -t rsa -b 4096 -f \$env:userprofile\.ssh\id_rsa -N ''" > /dev/null 2>&1
139+
SSH_CMD="ssh-keygen -t rsa -b 4096 -f \$env:USERPROFILE\.ssh\id_rsa -N '\"\"'"
140+
powershell.exe -Command $SSH_CMD
140141
KEY=$(powershell.exe -NoProfile -Command 'Get-Content $env:userprofile\.ssh\id_rsa.pub')
141142
echo $KEY | sudo tee -a /home/clab/.ssh/authorized_keys > /dev/null
142143
;;

0 commit comments

Comments
 (0)