Author Topic: How to configure ssh access to the Zentyal 7.0  (Read 2173 times)

seidhe

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
How to configure ssh access to the Zentyal 7.0
« on: September 05, 2021, 08:39:47 pm »
Hello everyone,
I'm a new user in this community.
I had Zentyal 3.2 server but It has failed. Decide to buy the new staff.
On the new machine I installed Zentyal 7.0 and I can not configure the ssh connection...  :o The ssh configuration folder has additional subfolders and I don't know for what... How to use it?
Can somebody help me properly configure service sshd?
Definitely, I will be grateful for any help.
Best Regards,
Seidhe.

turalyon

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +15/-0
    • View Profile
Re: How to configure ssh access to the Zentyal 7.0
« Reply #1 on: September 06, 2021, 03:50:48 pm »
Hi,

You need to check if the ssh service is running, which port it is using and if it is listening in that port:

Code: [Select]
## To see if the SSH is running
sudo systemctl status ssh

## To get the SSH port
sudo grep 'Port' /etc/ssh/sshd_config

## To see if the port is correctly listening (in this example, the port is 22)
ss -tunpl | grep '22'

Once you have ensure that the service is OK, make sure that the firewall allows the connection. You can check it in Zentyal Admin Interface.

---
“This world is ours, and by the Holy Light we will keep it safe, now and forever".

seidhe

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: How to configure ssh access to the Zentyal 7.0
« Reply #2 on: September 08, 2021, 03:39:17 pm »
Hi,
after modification of ssd_config I received this:

sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-09-08 15:31:04 CEST; 1min 0s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 125971 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 125973 (sshd)
      Tasks: 1 (limit: 18654)
     Memory: 1.1M
     CGroup: /system.slice/ssh.service
             └─125973 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

wrz 08 15:31:04 orion systemd[1]: Starting OpenBSD Secure Shell server...
wrz 08 15:31:04 orion sshd[125971]: Unable to load host key: /etc/ssh/ssh_host_dsa_key
wrz 08 15:31:04 orion sshd[125973]: Unable to load host key: /etc/ssh/ssh_host_dsa_key
wrz 08 15:31:04 orion sshd[125973]: Server listening on 0.0.0.0 port 100.
wrz 08 15:31:04 orion sshd[125973]: Server listening on :: port 100.
wrz 08 15:31:04 orion systemd[1]: Started OpenBSD Secure Shell server.


After that I allowed access from external network for ssh in firewall module and I saved settings.
allow    10.8.0.6/32    SSH    access SSH    
allow    10.8.0.0/24    SSH    access SSH
It seams to not working when I tried to connect from external network. Server is running on eth0 192.168.1.2/24. Routing on router is fine.
 
« Last Edit: September 09, 2021, 05:49:08 pm by seidhe »

turalyon

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +15/-0
    • View Profile
Re: How to configure ssh access to the Zentyal 7.0
« Reply #3 on: September 10, 2021, 04:38:25 pm »
According the output, your SSH service is using port 100. Did you modify the SSH service (Network -> Services) or created a new one with that particular port?

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever"

seidhe

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: How to configure ssh access to the Zentyal 7.0
« Reply #4 on: September 10, 2021, 09:00:49 pm »
Yes, I did, I don't want to share the connection on the standard port.

seidhe

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: How to configure ssh access to the Zentyal 7.0
« Reply #5 on: September 10, 2021, 09:15:06 pm »
According the output, your SSH service is using port 100. Did you modify the SSH service (Network -> Services) or created a new one with that particular port?

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever"

I found the issue, I created a new service for SSH with port 100, but I should add just a new configuration line in the defined SSH service. Now it works. Thanks a lot.
« Last Edit: September 10, 2021, 09:23:13 pm by seidhe »