I'm using Git Bash with Windows at the moment to SSH into a Linux server.
A config file is being used at the directory: "C:\Users\FirstName LastName.ssh\config"
The config file looks like this:
Host hub
HostName 192.168.1.151
User root
IdentityFile C:\Users\FirstName LastName\.ssh\hub
As you can see there is a space character in between Firstname and LastName at IdentityFile. That leads Git Bash to not being able to read the path specified. It prints this error: /c/Users/FirstName LastName/.ssh/config line 4: garbage at end of line; "LastName\\.ssh\\hub".
I've tried to use quotes to specify string and I've tried using %USERPROFILE% variable in the IdentityFile Path so there are no spaces.
The solution with quotes leads to this error:
no such identity: \342\200\252\342\200\252\342\200\252\342\200\252C:\\Users\\FirstName LastName\.ssh\\hub: No such file or directory
And then asks me for the password:
root@192.168.1.151's password:
The solution with %USERPROFILE% gives me this error:
percent_expand: unknown key %U
So I'm stuck here basically, any ideas on how to fix this?