[HowTo] Your first Debian server

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#21 Post by arzgi »

DebianNovice wrote: 2023-10-05 07:41
When I run the SSH command on laptop through root and type the IP Address I set in the /network/interfaces I get "port 22: No route to host".
So yeah I am stuck in this step.

Edit : Tried checking for firewall , ufw is not installed , tried installing it using apt , was getting an error like "Can't resolve "deb.debian.org"".

Now you find the culprit, your network is not configured right. Try

Code: Select all

 ip a
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 ....
and post the result, just remember to use code tags

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#22 Post by DebianNovice »

arzgi wrote: 2023-10-05 10:01
DebianNovice wrote: 2023-10-05 07:41
When I run the SSH command on laptop through root and type the IP Address I set in the /network/interfaces I get "port 22: No route to host".
So yeah I am stuck in this step.

Edit : Tried checking for firewall , ufw is not installed , tried installing it using apt , was getting an error like "Can't resolve "deb.debian.org"".

Now you find the culprit, your network is not configured right. Try

Code: Select all

 ip a
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 ....
and post the result, just remember to use code tags

Hi , I did -> I ran the command on the server I am trying to connect to

Code: Select all

ip a

Code: Select all

 
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_ift forever 
	inet6 ::1/128 scope host 
		valid_ift forever preferred_ift forever 
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 
	link/ether 38:60:77:2e:cd:b9 brd ff:ff:ff:ff:ff:ff 
	altname enp0s25 
	inet 192.168.0.107/24 brd 192.168.0.255 scope global eno1 
		valid_lft forever preferred_lft forever
3: enx00e04c534458: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 
	link/ether 00:e0:4c:53:44:58 brd ff:ff:ff:ff:ff:ff

arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#23 Post by arzgi »

Yes, it has no network connection. You have to trouble shoot that before you can expect ssh-server to respond.

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#24 Post by DebianNovice »

arzgi wrote: 2023-10-05 17:45 Yes, it has no network connection. You have to trouble shoot that before you can expect ssh-server to respond.
Can you help me with that?

arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#25 Post by arzgi »

Knowing nothing how your servers is configured, try these first:
https://wiki.debian.org/WiFi
https://wiki.debian.org/NetworkConfiguration

I use only systemd network for wired, and iwd/systemd newtork for wireless, but the older iproute & /etc/network/interfaces and wpasupplicant are still valid options.

Ask more if you need help.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2096
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 160 times
Been thanked: 226 times

Re: [HowTo] Your first Debian server

#26 Post by Hallvor »

Check that your Ethernet cable is in order and properly connected. Then try requesting an IP-address with dhclient <interface name>, for instance:

Code: Select all

# dhclient eno1
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#27 Post by DebianNovice »

Hallvor wrote: 2023-10-06 15:18 Check that your Ethernet cable is in order and properly connected. Then try requesting an IP-address with dhclient <interface name>, for instance:

Code: Select all

# dhclient eno1
I checked , it's looking fine , however when I ran dhclient eno1 nothing happened.

arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#28 Post by arzgi »

In Linux no news is good news,

Try again

Code: Select all

ip a

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#29 Post by DebianNovice »

arzgi wrote: 2023-11-01 12:33 In Linux no news is good news,

Try again

Code: Select all

ip a
Same thing as before except the Interface name got changed for reason , it was eno1 before now it's eth0 and it is still written no carrier.

Edited :

Code: Select all

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default glen 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 valid_lft forever preferred.lft forever 

2: eth0: <NO-CARRIER , BROADCAST ,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default glen 1000 
link/ether 38:60:77:2e:cd:b9 brd ff:ff:ff:ff:ff:ff 
altname eno1 
altname enp0s25 
inet 192.168.0.107/24 brd 192.168.0.255 scope global eno1 
     valid_lft forever preferred.lft forever 

3: ethl: <BROADCAST , MULTICAST , UP , LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default glen 1000 
link/ether 00:e0:4c:53:44:58 brd ff:ff:ff:ff:ff:ff 
inet 192.168.0.105/24 brd 192.168.0.255 scope global dynamic ethl 
valid_lft 85535sec preferred.lft 85535sec
 inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
valid_lft forever preferred.lft forever 

Last edited by DebianNovice on 2023-11-01 12:46, edited 2 times in total.

arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#30 Post by arzgi »

It would be better if you would post the result of the command.

Anyways, do you see lights to where the net cable is connected, if not try different cable.

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#31 Post by DebianNovice »

arzgi wrote: 2023-11-01 12:40 It would be better if you would post the result of the command.

Anyways, do you see lights to where the net cable is connected, if not try different cable.
Done.

arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#32 Post by arzgi »

DebianNovice wrote: 2023-11-01 12:34
Same thing as before except the Interface name got changed for reason , it was eno1 before now it's eth0 and it is still written no carrier.

Edited :

Code: Select all

3: ethl: <BROADCAST , MULTICAST , UP , LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default glen 1000 
link/ether 00:e0:4c:53:44:58 brd ff:ff:ff:ff:ff:ff 
inet 192.168.0.105/24 brd 192.168.0.255 scope global dynamic ethl 
valid_lft 85535sec preferred.lft 85535sec
 inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
valid_lft forever preferred.lft forever 

Congrats, try pinging google

Code: Select all

$ ping google.com
PING google.com (216.58.211.238) 56(84) bytes of data.
64 bytes from mad01s24-in-f238.1e100.net (216.58.211.238): icmp_seq=1 ttl=60 time=2.02 ms
64 bytes from mad07s20-in-f14.1e100.net (216.58.211.238): icmp_seq=2 ttl=60 time=2.02 ms
64 bytes from mad07s20-in-f14.1e100.net (216.58.211.238): icmp_seq=3 ttl=60 time=1.95 ms

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#33 Post by DebianNovice »

arzgi wrote: 2023-11-01 13:00
DebianNovice wrote: 2023-11-01 12:34
Same thing as before except the Interface name got changed for reason , it was eno1 before now it's eth0 and it is still written no carrier.

Edited :

Code: Select all

3: ethl: <BROADCAST , MULTICAST , UP , LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default glen 1000 
link/ether 00:e0:4c:53:44:58 brd ff:ff:ff:ff:ff:ff 
inet 192.168.0.105/24 brd 192.168.0.255 scope global dynamic ethl 
valid_lft 85535sec preferred.lft 85535sec
 inet6 fe80::2e0:4cff:fe53:4458/64 scope link 
valid_lft forever preferred.lft forever 

Congrats, try pinging google

Code: Select all

$ ping google.com
PING google.com (216.58.211.238) 56(84) bytes of data.
64 bytes from mad01s24-in-f238.1e100.net (216.58.211.238): icmp_seq=1 ttl=60 time=2.02 ms
64 bytes from mad07s20-in-f14.1e100.net (216.58.211.238): icmp_seq=2 ttl=60 time=2.02 ms
64 bytes from mad07s20-in-f14.1e100.net (216.58.211.238): icmp_seq=3 ttl=60 time=1.95 ms

It returns

Code: Select all

Temporary failure in name resolution

arzgi
Posts: 1408
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 56 times

Re: [HowTo] Your first Debian server

#34 Post by arzgi »

I already suggested https://wiki.debian.org/NetworkConfiguration

Read carefully.

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#35 Post by DebianNovice »

arzgi wrote: 2023-11-01 13:29 I already suggested https://wiki.debian.org/NetworkConfiguration

Read carefully.
Man , the wiki is way above my pay grade. But fine I will try to read it.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2096
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 160 times
Been thanked: 226 times

Re: [HowTo] Your first Debian server

#36 Post by Hallvor »

This may be a DNS issue:

Please post the following output:

Code: Select all

$ ping -c3 8.8.8.8
And

Code: Select all

$ cat /etc/resolv.conf
And finally

Code: Select all

$ cat /etc/nsswitch.conf
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#37 Post by DebianNovice »

@Hallvor

Code: Select all

 $ping -c3 8.8.8.8
 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
 From 192.168.0.107 icmp_seq=1 Destination Host Unreachable.
 From 192.168.0.107 icmp_seq=2 Destination Host Unreachable.
 From 192.168.0.107 icmp_seq=3 Destination Host Unreachable.
 
 --- 8.8.8.8 ping statistics ---
 3 packets transmitted , 0 recieved , +3 errors , 100% packet loss , time 2021ms pipe 2
 

Code: Select all

 $cat /etc/resolv.conf
 nameserver 8.8.8.8
 

Code: Select all

 $cat /etc/nsswitch.conf
passwd: files systemd
group: files systemd
shadow: files
gshadow: files

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup : nis

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#38 Post by DebianNovice »

Hallvor wrote: 2023-11-01 16:24 This may be a DNS issue:

Please post the following output:

Code: Select all

$ ping -c3 8.8.8.8
And

Code: Select all

$ cat /etc/resolv.conf
And finally

Code: Select all

$ cat /etc/nsswitch.conf
Hi , can you reply?

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2096
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 160 times
Been thanked: 226 times

Re: [HowTo] Your first Debian server

#39 Post by Hallvor »

If I knew the answer, I would reply already. Apart from checking that your cable works and is well connected, I have no idea.

You would probably get more and better help on your networking problems if you start a new thread in the appropriate forum: viewforum.php?f=5

I understand that this must be frustrating, but hang in there a little longer and I'll bet someone has an answer.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

DebianNovice
Posts: 66
Joined: 2022-08-28 23:14

Re: [HowTo] Your first Debian server

#40 Post by DebianNovice »

Hallvor wrote: 2023-11-08 14:32 If I knew the answer, I would reply already. Apart from checking that your cable works and is well connected, I have no idea.

You would probably get more and better help on your networking problems if you start a new thread in the appropriate forum: viewforum.php?f=5

I understand that this must be frustrating, but hang in there a little longer and I'll bet someone has an answer.
Is it possible just to reinstall debian and try doing this again?

Post Reply