I'm having trouble passing a path as an argument which has a space inside.
keyLocation="/Users/vladimir/Google\ Drive/file.pem"
ssh -i $keyLocation [email protected];
This give me the below error:
Warning: Identity file /Users/vladimir/Google not accessible: No such file or directory.
Basically after the assignment keyLocation itself becomes "/Users/vladimir/Google Drive/file.pem" (no ) so when it tries to use $keyLocation as an argument it passes it as
ssh -i /Users/vladimir/Google Drive/file.pem [email protected]
How can I make the ssh command recognise it as a path which has a space inside?
$"$keyLocation"