Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: RIA77 on 09 May 2021, 17:52:04

Title: [SOLVED] SSH configuring
Post by: RIA77 on 09 May 2021, 17:52:04
Hello and thank you very much for your help.
 I have XFCE Artix, installed from base, Its OpenRC Artix XFCE.
 I just noticed that ssh don't work.
 Reinstalled ssh.
https://wiki.artixlinux.org/Main/OpenRC
Tried with wiki.
 
Title: Re: SSH configuring
Post by: alium on 09 May 2021, 18:14:45
I just noticed that ssh don't work.
what do you imagine under this sentence?
Title: Re: SSH configuring
Post by: ndowens on 09 May 2021, 18:35:48
It'll be helpful if you could output any errors and other info. Not work is not helping us narrowing down the issue, e.g. error showing,if any.
Title: Re: SSH configuring
Post by: RIA77 on 09 May 2021, 19:15:03
OpenSSH_8.6p1, OpenSSL 1.1.1k  25 Mar 2021

Quote
[linux@artix ~]$ ps aux | grep sshd
root      1942  0.0  0.0   3480   228 ?        S    19:04   0:00 supervise-daemon sshd --start /usr/bin/sshd -- -f /etc/ssh/sshd_config -D
root      1943  0.0  0.0   8964  5776 ?        Ss   19:04   0:00 sshd: /usr/bin/sshd -f /etc/ssh/sshd_config -D [listener] 0 of 10-100 startups
linux     3188  0.0  0.0   6436  2368 pts/0    S+   19:13   0:00 grep --colour=auto sshd
[linux@artix ~]$ netstat -plant | grep :22
bash: netstat: нема такве наредбе (no such command, error)
[linux@artix ~]$

what do you imagine under this sentence?
SSH is installed, but not running.
Title: Re: SSH configuring
Post by: alium on 09 May 2021, 19:36:35
ssh's service is instaled,, enabled and started ?
see pacman -Ss ssh


Title: Re: SSH configuring
Post by: strajder on 09 May 2021, 19:44:35
SSH is installed, but not running.

Not true:
Quote
root      1942  0.0  0.0   3480   228 ?        S    19:04   0:00 supervise-daemon sshd --start /usr/bin/sshd -- -f /etc/ssh/sshd_config -D
root      1943  0.0  0.0   8964  5776 ?        Ss   19:04   0:00 sshd: /usr/bin/sshd -f /etc/ssh/sshd_config -D [listener] 0 of 10-100

Quote
[linux@artix ~]$ netstat -plant | grep :22
bash: netstat: нема такве наредбе (no such command, error)
[linux@artix ~]$
Just as the output says here, you don't have netstat command in path, If you haven't installed it, it is a part of the package net-tools.
Title: Re: SSH configuring
Post by: RIA77 on 09 May 2021, 19:58:06
ssh's service is instaled,, enabled and started ?
see pacman -Ss ssh
Yes, it is.
 
Quote
ystem/libssh2 1.9.0-3 [инсталиран]
    A library implementing the SSH2 protocol as defined by Internet Drafts
system/openssh 8.6p1-1 [инсталиран]
    Premier connectivity tool for remote login with the SSH protocol
system/openssh-openrc 20210505-1 (openrc-system) [инсталиран]
Quote
netstat -plant | grep :22
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                  
tcp6       0      0 :::22                   :::*                    LISTEN   
  I am confused, there was some error at boot about ssh, but I don't know how to reproduce it.
 I tried to activate wifi connection at boot, but I am not sure that I managed to.
Title: Re: SSH configuring
Post by: RIA77 on 09 May 2021, 20:33:34
rc-update show -v
       NetworkManager |      default                          
               agetty |                                       
          agetty.tty1 |      default                          
          agetty.tty2 |      default                          
          agetty.tty3 |      default                          
          agetty.tty4 |      default                          
          agetty.tty5 |      default                          
          agetty.tty6 |      default                          
               binfmt | boot                                  
             bootmisc | boot                                  
              cgroups |                                 sysinit
          consolefont |                                       
                 dbus |      default                          
                devfs |                                 sysinit
                dmesg |                                 sysinit
              elogind | boot                                  
                 fsck | boot                                  
             hostname | boot                                  
              hwclock | boot                                  
              keymaps | boot                                  
            killprocs |                        shutdown       
    kmod-static-nodes |                                 sysinit
              lightdm |      default                          
                local |      default nonetwork                
           localmount | boot                                  
             loopback | boot                                  
              modules | boot                                  
             mount-ro |                        shutdown       
                 mtab | boot                                  
           net-online |                                       
               net.lo | boot                                  
             netmount |      default                          
              numlock |                                       
         opensysusers | boot                                  
     opentmpfiles-dev |                                 sysinit
   opentmpfiles-setup | boot                                  
              osclock |                                       
               procfs | boot                                  
                 root | boot                                  
             runsvdir |                                       
            s6-svscan |                                       
         save-keymaps | boot                                  
    save-termencoding | boot                                  
            savecache |                        shutdown       
                 sshd | boot default                          
            sshd.eth0 |                                       
           sshd.wlan0 |                                       
                 swap | boot                                  
              swclock |                                       
               sysctl | boot                                  
                sysfs |                                 sysinit
         termencoding | boot                                  
                 udev |                                 sysinit
          udev-settle |                                       
         udev-trigger |        
Title: Re: SSH configuring
Post by: RIA77 on 09 May 2021, 20:34:31
If I enable sshd.wlan0, there was some error, so I disable it.
Title: Re: SSH configuring
Post by: RIA77 on 14 May 2021, 15:45:09
openrc default
error sshd.wlan0 need service net.wlan0



Title: Re: SSH configuring
Post by: nous on 15 May 2021, 12:42:10
Code: [Select]
ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 00:56:17
Thank you. But there are always errors.

 Bringing up interface wlan0
 *   Caching network module dependencies
 *   ERROR: interface wlan0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: net.wlan0 failed to start
 * ERROR: cannot start sshd.wlan0 as net.wlan0 would not start
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 01:15:57
I have been using two installations of Artix. Another installation is s6 xfce.
 How to start sshd at boot with s6 ? Thank you.
Title: Re: SSH configuring
Post by: ndowens on 17 May 2021, 01:38:20
I have been using two installations of Artix. Another installation is s6 xfce.
 How to start sshd at boot with s6 ? Thank you.
checkout wiki.artixlinux.org there is how to for inits and other things
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 09:53:28
I checked it already. I started ufw at boot, but not ssh.
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 11:18:50
Unable to open  /var/log
 read only file system (appears at boot).

 s6-rc-bundle-update add default ssh          
s6-rc-bundle: fatal: identifier ssh does not exist in database /run/s6-rc/compiled
Error when trying to add  ssh!

 SSH is installed.
Title: Re: SSH configuring
Post by: AlexanderAlex on 17 May 2021, 11:28:39
Replace ssh with sshd
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 14:23:51
s6-rc-bundle-update add default sshd
s6-rc-bundle: fatal: identifier sshd does not exist in database /run/s6-rc/compiled
Error when trying to add  sshd!
Title: Re: SSH configuring
Post by: strajder on 17 May 2021, 14:36:08
Code: [Select]
# pacman -Sy
# pacman -S openssh openssh-s6
# s6-rc-bundle-update add default sshd
# s6-rc -u change sshd

Read those:
https://wiki.archlinux.org/title/pacman
https://wiki.artixlinux.org/Main/S6
Quote
Installation of services

s6 service packages are named package_name-s6 and, when installed, will be available in /etc/s6/sv.

Edit: Again, it is not true that SSH is not running on your system if you have this (from this message (https://forum.artixlinux.org/index.php/topic,2565.msg16917.html#msg16917)):
Quote
[linux@artix ~]$ ps aux | grep sshd
root      1942  0.0  0.0   3480   228 ?        S    19:04   0:00 supervise-daemon sshd --start /usr/bin/sshd -- -f /etc/ssh/sshd_config -D
root      1943  0.0  0.0   8964  5776 ?        Ss   19:04   0:00 sshd: /usr/bin/sshd -f /etc/ssh/sshd_config -D [listener] 0 of 10-100 startups

linux     3188  0.0  0.0   6436  2368 pts/0    S+   19:13   0:00 grep --colour=auto sshd
[linux@artix ~]$ netstat -plant | grep :22
bash: netstat: нема такве наредбе (no such command, error)
[linux@artix ~]$
So repeated statements that SSH doesn't work or is refusing to start on your system can't be seen as anything else than spamming/trolling the forum.
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 15:18:19
Thank you.
 But I am confused about following message
Bringing up interface wlan0
 *   Caching network module dependencies
 *   ERROR: interface wlan0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: net.wlan0 failed to start
 * ERROR: cannot start sshd.wlan0 as net.wlan0 would not start

Title: Re: SSH configuring
Post by: strajder on 17 May 2021, 15:32:03
That is a separate issue than SSH not running (which turned out to  be running!) and should normally be in a separate topic. But whatever.

*   Ensure that you have loaded the correct kernel module for your hardware

This means exactly what it says in English: you probably don't have the correct kernel module loaded for your Wireless card or Wireless device. Many WiFi devices come with proprietary drivers which don't support GNU/Linux, and some only work after manually compiling and installing their drivers. If you're lucky, your card will have the driver in linux-firmware package. If not, tough luck. That's why it is much easier to use wired, cable Ethernet for GNU/Linux.
Title: Wifi error
Post by: RIA77 on 17 May 2021, 16:10:56
Hello to all and thank you for your help.
 

 But I am confused about following message
Bringing up interface wlan0
 *   Caching network module dependencies
 *   ERROR: interface wlan0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: net.wlan0 failed to start
 * ERROR: cannot start sshd.wlan0 as net.wlan0 would not start

 Wifi drivers working as it should be, i have no problems with connection.
Is this something that is important ?
Title: Re: Wifi error
Post by: strajder on 17 May 2021, 16:47:45
https://forum.artixlinux.org/index.php/topic,2565.msg17121.html#msg17121
Title: Re: SSH configuring
Post by: RIA77 on 17 May 2021, 18:16:10
This means exactly what it says in English: you probably don't have the correct kernel module loaded for your Wireless card or Wireless device. Many WiFi devices come with proprietary drivers which don't support GNU/Linux, and some only work after manually compiling and installing their drivers. If you're lucky, your card will have the driver in linux-firmware package. If not, tough luck. That's why it is much easier to use wired, cable Ethernet for GNU/Linux.
Мy wifi is working, should I recompile it ?
 What is the meaning of this error ?
Title: Re: SSH configuring
Post by: alium on 17 May 2021, 19:16:40
sshd is the OpenSSH server daemon, configured with /etc/ssh/sshd_config. Are you sure, that you really need run SSH SERVER on your computer? The client is enough for most normal users... (they normaly install it via pacman-openssh-openrc/runit/s6 )

sorry, but you do not seem to me like advanced user or admin... that, why i ask...
Title: Re: SSH configuring
Post by: RIA77 on 19 May 2021, 10:06:35
Thank you for your interest.
 I want to build secure desktop, not as server, but as much as possible.
 
Title: Re: SSH configuring
Post by: RIA77 on 26 May 2021, 14:04:24
Installed artix hardened kernel - solved.
 Another problem solved - system was disconnected during stand-by, and network manager did not run after resume.

On hardened kernel, there was disconnection, but Artix auto-connects on resume.