Help with error "Bad owner or permissions on /home/username/.ssh/config"

Open
#47 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #51 by @KronosTheLate — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
julia
Domain
tooling

Research direction

Start by reproducing connect_remote("[email protected]", tunnel=:ssh) and inspect src/tunnels.jl at lines 31, 80, and 87, along with src/client.jl around lines 120-138. Compare the direct SSH behavior with the tunnel command and determine what setup or handling is required for the reported SSH configuration error and connection refusal.

Written by the indexing model from the issue text.

Description

I am able to run ~ $ssh [email protected] with no problem to connect passwordless to my RaspberryPi. When I try to run connect_remote on the client, I get the following error:

julia> connect_remote("[email protected]", tunnel=:ssh)
┌ Warning: Tunnel output
│   errors =
│    Bad owner or permissions on /home/dennishb/.ssh/config
│    
└ @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/tunnels.jl:31
┌ Error: Exceeded maximum socket connection attempts
└ @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/tunnels.jl:87
ERROR: IOError: connect: connection refused (ECONNREFUSED)
Stacktrace:
 [1] wait_connected(x::Sockets.TCPSocket)
   @ Sockets ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:528
 [2] connect
   @ ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:563 [inlined]
 [3] connect
   @ ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:549 [inlined]
 [4] connect_via_tunnel(host::String, port::Int64; retry_timeout::Int64, tunnel::Symbol, ssh_opts::Cmd, region::Nothing, namespace::Nothing)
   @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/tunnels.jl:80
 [5] setup_connection!(conn::RemoteREPL.Connection)
   @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:138
 [6] #Connection#38
   @ ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:128 [inlined]
 [7] Connection
   @ ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:120 [inlined]
 [8] connect_remote(host::String, port::Int64; tunnel::Symbol, ssh_opts::Cmd, region::Nothing, namespace::Nothing)
   @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:487
 [9] top-level scope
   @ REPL[4]:1

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) were

Host 192.168.4.2
  HostName 192.168.4.2
  User pi

I do not recall having configured this manually. I tried adding the lines

Host 192.168.4.2
  User pi
  IdentityFile ~/.ssh/id_rsa

to the .ssh/config file on the client, but that did not change anything.

Any help on what may have gone wrong?

Dominant language
Julia
Stars
148
Forks
17
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaWeb/RemoteREPL.jl

All issues in JuliaWeb/RemoteREPL.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.