Jump to content

Éd_D

Active Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by Éd_D

  1. On the LAN Turtle, AutoSSH is running:

    root@turtle:~# ps
    […]
    28771 root       936 S    /usr/sbin/autossh -M 20000    -i /root/.ssh/id_rsa -N -T -R xxxxx:localhost:22 turtle@vps.domain.tld -p 22
    […]
    root@turtle:~# 

    (Debian man page about autossh [https://manpages.debian.org/bullseye/autossh/autossh.1.en.html] is not complete enough to understand all the command line arguments.)

    From here, everything looks ok. No problem with the ssh connection to the VPS.

  2. 3 hours ago, chrizree said:

    Was that default settings or did you change the file yourself? Why add the vps to 2222?

    In fact, I have changed the ssh port (22) by a custom one (port number chosen between 49152 and 65535) for security reason.

    When I copy commands and screen output on the forum, I write 2222 instead the real l number because "2222" look nice as customed ssh number…

    🙂

  3. 2 hours ago, chrizree said:

    Did you use the correct port?

    I tried both:

    turtle@vps:~$ ssh root@localhost
    ssh: connect to host localhost port 22: Connection refused
    turtle@vps:~$ ssh -p 22 root@localhost
    ssh: connect to host localhost port 22: Connection refused
    turtle@vps:~$ ssh -p 2222 root@localhost
    root@localhost's password: 
    Permission denied, please try again.
    root@localhost's password: 
    Permission denied, please try again.
    root@localhost's password: 
    ^C
    turtle@vps:~$ 

     

  4. I think that sshd is misconfigured on the vps:

    root@vps:~# grep ^[^#] /etc/ssh/sshd_config 
    Port 2222
    PermitRootLogin no
    ChallengeResponseAuthentication no
    UsePAM yes
    PrintMotd no
    AcceptEnv LANG LC_*
    Subsystem sftp	/usr/lib/openssh/sftp-server
    PasswordAuthentication yes
    root@vps:~# 

    (When commissioning, I only uncommented the Port directive, changed 22 to 2222 on this ligne and changed yes to no for the PermitRootLogin directive…)

×
×
  • Create New...