Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] SSH Refused due to WiFi net.wlan0 misconfiguration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nap
n00b
n00b


Joined: 18 Aug 2017
Posts: 10

PostPosted: Sun Nov 12, 2017 4:16 pm    Post subject: [SOLVED] SSH Refused due to WiFi net.wlan0 misconfiguration Reply with quote

I have a bit of a problem with accessing my robot using SSH, even though I'm using a wired connection.
The problem relates to my efforts to get the robot to automatically connect on WiFi. I added a symlink net.wlan0 that points to net.lo, and it worked. However, on the next boot, ifconfig showed that wlan0 did not exist. So I thought I would add it to the boot run-level 'rc-update add net.wlan0 boot'. But, now I cannot even log into the robot using the wired connection: I get a "connection refused" response.

The root partition is an embedded storage device and I only have access to the "User data" part which is stored on a micro-SD and includes some system files.
I'm wondering if:
1) There is a way of arranging a script to run from one of the following folders on boot up that would remove net.wlan0 from boot (ie remove the symlink)?
On the micro-SD, I have access to the following paths:
/etc /etc/ssh /etc/connman (and the following files: babile.conf, hostname, localtime, resolve.conf, shadow)
/home (I have access to the entire home area, but the user has no sudo rights)
/lost+found
/media
/var /var/lib (inside lib, I have ./alsa ./bluetooth ./connman ./dbus ./dhcp ./firewall_mode ./gentoo ./iptables ./lib ./minidump ./misc ./ntp ./packagemanager ./portage ./store) /var/lib/lib/ofono

2) Since some of these folders/files are system related, I'm wondering if it's possible place something into /etc/runlevels/boot to invalidate the symlink that rc-update put there?

3) Any ideas on how I can persuade SSHD to accept my connection? (Telnet? Though I don't think it's running a daemon.)

Cheers,
Nap


Last edited by nap on Fri Dec 08, 2017 1:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Guru
Guru


Joined: 17 Sep 2010
Posts: 566
Location: Frankfurt, Germany

PostPosted: Sun Nov 12, 2017 5:04 pm    Post subject: Reply with quote

If I understand your post correctly, you have two separate problems:
  • your wlan interface doesn't come up after boot
  • even if your interface is up, you get a "connection refused" when you want to connect to your robot
I can't help you with the first problem.

Regarding the second problem: if your SSH client tells you "Connection refused", this usually means it can establish a TCP/IP connection to your robot, but there is no SSH daemon listening on the SSH port. The most common reasons for that are: either the SSH daemon isn't running or it is not configured to listen on your interface. Look at the file /etc/ssh/sshd_config: are there any non-standard settings for the configuration variables "Listen" or "Port"?
Back to top
View user's profile Send private message
nap
n00b
n00b


Joined: 18 Aug 2017
Posts: 10

PostPosted: Tue Nov 14, 2017 6:52 am    Post subject: Reply with quote

Hi Mike155, there is a ssh daemon running, to which I was connecting over wired ethernet. However, it is possible that the daemon is crashing during boot-up as a result of my setting the net.wlan0 to be a boot level service. Unfortunately, I cannot check settings since I cannot log in via SSH.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2577

PostPosted: Tue Nov 14, 2017 7:24 am    Post subject: Re: SSH Refused due to WiFi net.wlan0 misconfiguration Reply with quote

nap wrote:
I have a bit of a problem with accessing my robot using SSH, even though I'm using a wired connection.
The problem relates to my efforts to get the robot to automatically connect on WiFi. I added a symlink net.wlan0 that points to net.lo,...

nap wrote:
... On the micro-SD, I have access to the following paths:
/etc /etc/ssh /etc/connman

Are you mixing setup of two different network managers?
Back to top
View user's profile Send private message
nap
n00b
n00b


Joined: 18 Aug 2017
Posts: 10

PostPosted: Fri Dec 08, 2017 1:51 pm    Post subject: Reply with quote

I've solved the problem by accessing the robot via its serial console (FTDI chip).
The problem was that I had created a boot level service for net.wlan0 and that was crashing the SSH daemon on boot up. Through the serial console, I was able to delete the net.wlan0 symlink in /etc/runlevels/boot and everything was fine on the next boot.


Thanks for the suggestions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum