-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with error "Bad owner or permissions on /home/username/.ssh/config" #47
Comments
What are the owner and permissions on this file?
This will be a problem because |
In case it is relevant, the command was run from a Julia process started from within VSCode. |
It looks ok. At least that's what my .ssh/config permissions seem to be. Try You can see the |
Actually I think those permissions were somehow broken on my end too - I haven't used RemoteREPL since I reinstalled my laptop. I suggest you run the following command on both client and server to fix permissions:
|
Also, you can get the exact ssh tunnel command by turning on debug logging on the client like this: julia> using RemoteREPL, Logging
julia> global_logger(ConsoleLogger(Logging.Debug));
julia> connect_repl("xyz");
┌ Debug: Connecting SSH tunnel to remote address xyz via ssh tunnel to 27754
│ ssh_cmd = `/home/c42f/.julia/artifacts/cf570328554ecb898e625367a9c9fb2c01f55267/bin/ssh -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -N -L 127.0.0.1:39133:localhost:27754 xyz`
└ @ RemoteREPL ~/.julia/dev/RemoteREPL/src/tunnels.jl:45
REPL mode remote_repl initialized. Press > to enter and backspace to exit. |
Are you sure this is correct? From https://stackoverflow.com/questions/50735833/what-is-the-difference-between-chmod-go-rwx-and-chmod-700, one answer states that "go-rwx removes read, write, execute permissions from the group and other users. It will not change permissions for the user that owns the file.", which does not seem like what we want to me. Based on https://www.ibm.com/docs/en/aix/7.2?topic=c-chmod-command, I am tempted to run I am also just now seeing that my proposed command is to add permission for the user, while yours removes them for groups and others. They are complimentary in a way, so perhaps you meant what you suggested. Does that mean that you believe that a potential fix is to remove permissions for others? It looks like both can be performed by running |
Edit: This comment was long and all wrong, so I packed it into a foldable menu. See later comments.
> Also, you can get the exact ssh tunnel command by turning on debug logging on the client like this
I think we have something. The SSH command being run is as follows
Which is different from the one I normally use:
Furthermore, when I attempt to excecute the one actually used, I get the permission error!
So it seems like the artifact has the wrong permissions. I tried setting them to my final proposed command in the comment above:
But as you can see, the permissions error persisted. Below is the actual permissions:
I also tried just setting all permissions for the file, but the same error presisted:
In fact, the error is |
You were absolutely right in your command about removing rather than adding premissions. Also about that the permissions should be changed for ~/.ssh/config. I did both of these wrong. The command that fixed the problem was
I the reason I finally got it was because of a comment from here
Which made me understand that I had to remove write permissions for everyone but the user. So the issue is fixed! (with the fix you offered a few comments back). I will keep this issue open until an addition has been made to the docs about this problem. Perhaps a "Troubleshooting" section would be nice? |
I am able to run
~ $ssh pi@192.168.4.2
with no problem to connect passwordless to my RaspberryPi. When I try to runconnect_remote
on the client, I get the following error:on the server (Pi), there is a Julia process running, connected with SSH, with
using RemoteREPL
having been run. It may be noteworthy that I am using 1.6 on the server (Pi), and 1.9 on the client, which could be the problem. However, the error message indicates that something else is the problem.The contents of
.ssh.config
(on the server side) wereI do not recall having configured this manually. I tried adding the lines
to the .ssh/config file on the client, but that did not change anything.
Any help on what may have gone wrong?
The text was updated successfully, but these errors were encountered: