fixed conditional
This commit is contained in:
parent
3867af6b9d
commit
a21b2d36ad
|
@ -5,7 +5,7 @@ ssh_command="ssh -i $key_file $tilde_username@$tilde_name"
|
|||
check_key_file() {
|
||||
if [ -f "$key_file" ]
|
||||
then
|
||||
while [ -z cat "$key_file" | head -n1 | grep "-----BEGIN .* PRIVATE KEY-----" ]
|
||||
while [ -z "$(cat $key_file | head -n1 | grep -- '-----BEGIN .* PRIVATE KEY-----')" ]
|
||||
do
|
||||
echo "$key_file does not look like a private key file, try again"
|
||||
bash
|
||||
|
|
Loading…
Reference in New Issue