• SSH not starting on non-standard port 2222

    From Digital Man@1:103/705 to Amessyroom on Sat Jun 22 20:50:16 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to All on Sat Jun 22 2024 06:42 pm

    I have modified my sbbs.ini to try and get it to start ssh on 2222 instead of 22. I'm running on Linux os so have my sshd already running on 22. I would prefer to keep it that way.

    I've tried setting the interface for ssh to the IP:Port also, and still doesn't seem to start.

    I've set logging to Debug, but I don't think it is starting at all.

    What do your terminal server log report?

    Any suggestions?

    Check the log output.
    --
    digital man (rob)

    Steven Wright quote #32:
    The colder the x-ray table, the more of your body is required to be on it. Norco, CA WX: 81.4øF, 49.0% humidity, 3 mph WNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Amessyroom@1:103/705 to All on Sun Jun 23 00:39:03 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to All on Sat Jun 22 2024 06:42 pm

    sbbs@vmi1943160 data]$ grep -i ssh error.log
    term 0005 !ERROR 13 binding SSH Server socket to port 22: Permission denied term 0005 !ERROR 13 binding SSH Server socket: Permission denied [sbbs@vmi1943160 data]$ grep -i ssh ../ctrl/sbbs.ini
    [BBS] Terminal (Telnet, SSH, RLogin, Raw-TCP) Server
    SSHInterface =
    ;SSHErrorLevel = Warning
    SSHErrorLevel = Debugging
    ; TCP port for Secure Shell (SSH) server:
    SSHPort = 2424
    SSHConnectTimeout = 10s
    ; ALLOW_SSH
    ; SSH_ANYAUTH
    Options = XTRN_MINIMIZED| ALLOW_SSH | ALLOW_SFTP

    Changed port to 2424, rebooted server, restarted SBBS and it is trying to bind to port 22; which the OS is using.

    Why is it ignorning the requested port of 2424

    ---
    þ Synchronet þ Too Lazy BBS - For those that want to sit and BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Amessyroom@1:103/705 to Digital Man on Sun Jun 23 09:33:13 2024
    Re: SSH not starting on non-standard port 2222
    By: Digital Man to Amessyroom on Sat Jun 22 2024 08:50 pm

    Re: SSH not starting on non-standard port 2222
    22. I would prefer to keep it that way.

    I've tried setting the interface for ssh to the IP:Port also, and still doesn't seem to start.

    I've set logging to Debug, but I don't think it is starting at all.

    What do your terminal server log report?

    Any suggestions?

    Check the log output.
    term 0005 !ERROR 13 binding SSH Server socket to port 22: Permission denied term 0005 !ERROR 13 binding SSH Server socket: Permission denied [sbbs@vmi1943160 data]$

    I have changed OS ssh to non 22 port. I've reran setcap and confirmed it has ability to point to privilege ports.

    I have setup netcat on port 22, and connected to it. So other port can be used.

    Maybe and OS issue. I have specified the IP in SSHInterface. Don't understand why it cannot bind and use 22, now that I've released it.

    ---
    þ Synchronet þ Too Lazy BBS - For those that want to sit and BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Amessyroom@1:103/705 to Digital Man on Sun Jun 23 14:49:01 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 09:33 am

    Now that port 22 is free. I tried 22, 222, and 2424 nothing will bind.

    I run netcat on port 22 and it binds and i can connect to it successfully.

    I've rebooted server. Restarted BBS. Nothing seems to get bound .


    Seems I have broken something in regards to this service starting.

    ---
    þ Synchronet þ Too Lazy BBS - For those that want to sit and BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Amessyroom on Sun Jun 23 12:52:17 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to All on Sun Jun 23 2024 12:39 am

    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to All on Sat Jun 22 2024 06:42 pm

    sbbs@vmi1943160 data]$ grep -i ssh error.log
    term 0005 !ERROR 13 binding SSH Server socket to port 22: Permission denied term 0005 !ERROR 13 binding SSH Server socket: Permission denied [sbbs@vmi1943160 data]$ grep -i ssh ../ctrl/sbbs.ini
    [BBS] Terminal (Telnet, SSH, RLogin, Raw-TCP) Server
    SSHInterface =
    ;SSHErrorLevel = Warning
    SSHErrorLevel = Debugging
    ; TCP port for Secure Shell (SSH) server:
    SSHPort = 2424
    SSHConnectTimeout = 10s
    ; ALLOW_SSH
    ; SSH_ANYAUTH
    Options = XTRN_MINIMIZED| ALLOW_SSH | ALLOW_SFTP

    Changed port to 2424, rebooted server, restarted SBBS and it is trying to bind to port 22; which the OS is using.

    Why is it ignorning the requested port of 2424

    Do you have more than one sbbs.ini file?

    If you run SCFG and go to Servers->Terminal Server, what does it say for "SSH Support"?
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #11:
    C64 = Commodore 64 (personal computer)
    Norco, CA WX: 94.8øF, 28.0% humidity, 11 mph WNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Amessyroom on Sun Jun 23 12:53:27 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 09:33 am

    Re: SSH not starting on non-standard port 2222
    By: Digital Man to Amessyroom on Sat Jun 22 2024 08:50 pm

    Re: SSH not starting on non-standard port 2222
    22. I would prefer to keep it that way.

    I've tried setting the interface for ssh to the IP:Port also, and still doesn't seem to start.

    I've set logging to Debug, but I don't think it is starting at all.

    What do your terminal server log report?

    Any suggestions?

    Check the log output.
    term 0005 !ERROR 13 binding SSH Server socket to port 22: Permission denied term 0005 !ERROR 13 binding SSH Server socket: Permission denied [sbbs@vmi1943160 data]$

    I have changed OS ssh to non 22 port. I've reran setcap and confirmed it has ability to point to privilege ports.

    I have setup netcat on port 22, and connected to it. So other port can be used.

    Maybe and OS issue. I have specified the IP in SSHInterface. Don't understand why it cannot bind and use 22, now that I've released it.

    Are those old log entries perhaps? You want to see the current/recent log entries from after you've made whatever changes you have.
    --
    digital man (rob)

    Steven Wright quote #2:
    Borrow money from pessimists -- they don't expect it back.
    Norco, CA WX: 94.8øF, 28.0% humidity, 11 mph WNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Denn@1:103/705 to Amessyroom on Sun Jun 23 13:17:39 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 09:33 am

    Re: SSH not starting on non-standard port 2222
    I've tried setting the interface for ssh to the IP:Port also, and
    still doesn't seem to start.

    Could it be a firewall port not opened problem?
    just a thought.

    ... I never used to be able to finish anything, but now I

    ---
    þ Synchronet þ the Outwest BBS - outwestbbs.com or outwest.synchro.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Denn on Sun Jun 23 17:48:00 2024
    Denn wrote to Amessyroom <=-

    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 09:33 am

    Re: SSH not starting on non-standard port 2222
    I've tried setting the interface for ssh to the IP:Port also, and
    still doesn't seem to start.

    Could it be a firewall port not opened problem?
    just a thought.

    Ummm.... no. What would a firewall have to do with a service not
    starting on a server?

    A firewall could prevent a connection from being made, but it has nothing
    to do with the actual service *starting* *up*.



    ... Can you tell me how to get, how to get to Sesame Street?
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Amessyroom@1:103/705 to Digital Man on Sun Jun 23 17:12:30 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 02:49 pm

    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 09:33 am

    Figured it out.

    sbbs generated a key when first started on the 17th, and left it , although it was never successful in starting the daemon

    I did not see this on console until, I turned off all other terminal services except ssh

    sbbs core dumped

    6/23 16:19:19 term SSH ERROR 'Couldn't import the session key used to protect the private key: Couldn't unwrap encrypted key' (-22) getting private key from bbs_thread
    [Threads: 8 Sockets: 19 Clients: 0 Served: 0 Errors: 20] (?=Help): Segmentation fault (core dumped)


    [sbbs@vmi1943160 ctrl]$ find $HOME -name \*.key -print /home/sbbs/ctrl/cryptlib.key
    [sbbs@vmi1943160 ctrl]$ ls -l cryptlib.key
    -rw------- 1 sbbs sbbs 1289 Jun 17 20:37 cryptlib.key
    [sbbs@vmi1943160 ctrl]$ date
    Sun Jun 23 04:39:49 PM EDT 2024

    Removing cryptlib.key fixed issue. Thanks to the documentation mentioning,
    this key elsewhere (when SY password is changed), I figured that is where problem was in this case.

    Is the console log written anywhere? I read in the wiki that running in daemon mode isn't recommended? But in daemon mode , I expect the console will be written
    to syslog local3.

    But then ...

    Telnet server started failing. I'm just sticking with telnet.

    When using ssh I had issues with syncterm 1.1b with activating session. 50/50 it would work, and then I could get logged in.

    At least, I know the source of the problem. Thanks for listening to my debugging

    ---
    þ Synchronet þ Too Lazy BBS - For those that want to sit and BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Amessyroom on Sun Jun 23 18:18:02 2024
    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 05:12 pm

    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 02:49 pm

    Re: SSH not starting on non-standard port 2222
    By: Amessyroom to Digital Man on Sun Jun 23 2024 09:33 am

    Figured it out.

    sbbs generated a key when first started on the 17th, and left it , although it was never successful in starting the daemon

    I did not see this on console until, I turned off all other terminal services except ssh

    sbbs core dumped

    6/23 16:19:19 term SSH ERROR 'Couldn't import the session key used to protect the private key: Couldn't unwrap encrypted key' (-22) getting private key from bbs_thread
    [Threads: 8 Sockets: 19 Clients: 0 Served: 0 Errors: 20] (?=Help): Segmentation fault (core dumped)

    A backtrace from that core dump would likely allow me to fix that issue: https://wiki.synchro.net/howto:gdb

    [sbbs@vmi1943160 ctrl]$ find $HOME -name \*.key -print /home/sbbs/ctrl/cryptlib.key
    [sbbs@vmi1943160 ctrl]$ ls -l cryptlib.key
    -rw------- 1 sbbs sbbs 1289 Jun 17 20:37 cryptlib.key
    [sbbs@vmi1943160 ctrl]$ date
    Sun Jun 23 04:39:49 PM EDT 2024

    Removing cryptlib.key fixed issue. Thanks to the documentation mentioning, this key elsewhere (when SY password is changed), I figured that is where problem was in this case.

    Is the console log written anywhere?

    Not normally, but if the "syslog" command-line option is used, it'll write to syslog.
    https://wiki.synchro.net/monitor:sbbscon

    I read in the wiki that running in daemon mode isn't recommended?

    I think you have that reversed: daemon mode *is* recommended. https://wiki.synchro.net/install:nix#daemon_mode

    But in daemon mode , I expect the console
    will be written
    to syslog local3.

    But then ...

    Telnet server started failing. I'm just sticking with telnet.

    When using ssh I had issues with syncterm 1.1b with activating session. 50/50 it would work, and then I could get logged in.

    At least, I know the source of the problem. Thanks for listening to my debugging

    I'm not clear if you're still having an issue or not. <shrug>
    --
    digital man (rob)

    Rush quote #50:
    I've always been a big sponge. - Neil Peart
    Norco, CA WX: 91.0øF, 24.0% humidity, 8 mph WSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)