Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] I can't ssh to the Gentoo machine.
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
rnpf
n00b
n00b


Joined: 05 Aug 2023
Posts: 8

PostPosted: Thu Nov 16, 2023 9:52 pm    Post subject: [SOLVED] I can't ssh to the Gentoo machine. Reply with quote

I use and used ssh to log in to the machine where I want to install and configure Gentoo. Until today, I never had a problem with it. This has changed today, possibly after rebooting the Gentoo machine.

When I log me in on the Gentoo machine itself (i. e. with the console prompt), I can query for my ip address. This address is assigned via DHCP. Still on the machine, I can to without problem # ping localhost and ssh xyz@localhost. So the ping deamon (if there is such a thing) and the ssh deamon are running.

Yet, ping 192.168.0.2 results in Destination Host Unreachable, ssh xyz@192.168.0.2 in No route to host.

I am connected to the internet, ping 8.8.8.8 works ok.

I installed X yesterday (also via ssh). Since I tried a few approaches (including changing the USE variable), I am not sure if I accedentially misconfigured something.

Unfortunately, I am not much of a network guru, so I have no idea how to proceed.


Last edited by rnpf on Fri Nov 17, 2023 8:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Thu Nov 16, 2023 10:23 pm    Post subject: Reply with quote

There is no ping daemon. ICMP echo requests are handled by the kernel network stack.

On both machines, what is the output of ip a ; ip r?
Back to top
View user's profile Send private message
rnpf
n00b
n00b


Joined: 05 Aug 2023
Posts: 8

PostPosted: Fri Nov 17, 2023 6:37 am    Post subject: Reply with quote

ip a on the Gentoo machine:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto kernel_lo
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 98:fa:9b:b1:4e:a4 brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
4: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 50:e0:85:80:95:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp0s20f3
       valid_lft 85582sec preferred_lft 74782sec
    inet6 fe80::1666:632b:515b:a7b1/64 scope link
       valid_lft forever preferred_lft forever


ip r on the gentoo machine:
Code:
default via 192.168.0.1 dev wlp0s20f3 proto dhcp src 192.168.0.102 metric 3004
192.168.0.0/24 dev wlp0s20f3 proto dhcp scope link src 192.168.0.102 metric 3004


ip a on the local machine:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether c8:f7:50:08:67:7e brd ff:ff:ff:ff:ff:ff
    altname enp0s31f6
3: wlp111s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether fc:77:74:d2:de:da brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.90/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp111s0
       valid_lft 86222sec preferred_lft 75422sec
    inet6 fe80::4d01:3367:2778:956d/64 scope link
       valid_lft forever preferred_lft forever


ip r on the local machine:
Code:
default via 192.168.0.1 dev wlp111s0 proto dhcp src 192.168.0.90 metric 3003
192.168.0.0/24 dev wlp111s0 proto dhcp scope link src 192.168.0.90 metric 3003
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1392
Location: Germany

PostPosted: Fri Nov 17, 2023 9:26 am    Post subject: Reply with quote

with this output from ip a you should be able to:

On the local machine
ssh username@192.168.0.102

and also ping 192.168.0.102
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.


Last edited by Banana on Sat Nov 18, 2023 9:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
rnpf
n00b
n00b


Joined: 05 Aug 2023
Posts: 8

PostPosted: Fri Nov 17, 2023 7:48 pm    Post subject: Reply with quote

Thank you for looking into this and confirming that the connection should work. Yet, it is still the case that I cannot ping nor ssh the remote machine.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Fri Nov 17, 2023 7:54 pm    Post subject: Reply with quote

As I read Banana's post, it was noting that the test in your initial post was wrong. You assigned one address to the Gentoo machine, then tried to access it with a completely different address. Banana gave you commands that use the correct address, so arguably that post confirms that your initial failures are correct, and the initial attempt should not work. However, I agree with Banana's implication that if you use the correct address, it should work. It is not clear to me from your most recent post whether you noticed the distinction. Please show us a failing command that you think should work, starting from your shell prompt and ending when the command exits. Also show us the result of running the commands Banana gave, if those are different from the one you think should work.
Back to top
View user's profile Send private message
rnpf
n00b
n00b


Joined: 05 Aug 2023
Posts: 8

PostPosted: Fri Nov 17, 2023 7:59 pm    Post subject: Reply with quote

Thanks for pointing out my mistake. I was indeed missing that the IP number of the Gentoo ends in 102. Somehow, I thought it was 2 and it remains a mystery how I have overlooked it. Anyway, with the correct address, the connection works.
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