-
Notifications
You must be signed in to change notification settings - Fork 18
Access is denied when configuring the ssh. #132
Comments
Thanks for filing this report. To comply with OpenSSH, when coder-cli initially creates the coder_enterprise private key file, it removes its own write permissions. This makes subsequent executions of the command fail unless the user manually executes something like I think the best path forward is to improve the error message providing these instructions. |
We could potentially make the command idempotent. If the key exists, we complete successfully, if it doesn't, we create it and complete successfully. Then we can have the error handling be for unexpected / extraneous cases. |
@nathanpotter The trouble with making this idempotent is that the user can regenerate their key from the dashboard. So sometimes we do need them to manually delete it so we can rewrite to the file. Kinda wonder how the |
Another issue for us is when we add a new environment and want to configure it locally via "coder config-ssh", it doesn't add quotes for the path to the key. Anyway I linked and created two pull requests that will solve this problem #139 #138. |
@cmoog both of them go merged, I believe this will be fixed in the next build of the cli. |
Hey,
when I am trying to configure the SSH via the command:
coder config-ssh
I am getting this error:
Error: fetch and write ssh key: open C:\Users\User Name\.ssh\coder_enterprise: Access is denied.
I tried to run it with Administrator privileges but with no luck, I am getting the same error.
Note that it throws me this error but still writes into the ssh config file. my guess is that my username in windows have spaces.
The text was updated successfully, but these errors were encountered: