• Anydesk on raspi

    From Jan Novak@3:770/3 to All on Tue Oct 27 10:01:37 2020
    Hello,

    I have a raspi running in other country without GUI - only CLI.
    Dyndns and other are not working because ipv4 over ipv6.
    After installing anydesk i can connect to the raspi, but my client says "display server not supported".

    Is ther any chance to connect to the CLI of my raspi?


    Jan

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Jan Novak on Tue Oct 27 10:28:04 2020
    Jan Novak <repcom@gmail.com> wrote:
    Hello,

    I have a raspi running in other country without GUI - only CLI.
    Dyndns and other are not working because ipv4 over ipv6.
    After installing anydesk i can connect to the raspi, but my client says "display server not supported".

    Is ther any chance to connect to the CLI of my raspi?

    I'm not sure what anydesk does but I connect to a remote Beaglebone
    Black (much like a Pi, SBC running Linux) using ssh via reverse tunnel
    ssh set up on the remote Beaglebone.

    So you need to set up reverse tunnel outgoing connections from your
    Pi, this you have to do with access to it of course. Then, once that's
    done you can access it using ssh from 'outside'.

    If you want to know more then just ask.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dr Eberhard Lisse@3:770/3 to Jan Novak on Tue Oct 27 14:07:51 2020
    AnyDesk is a remote desktop viewer and doesn't do CLI.

    el

    On 27/10/2020 11:01, Jan Novak wrote:
    Hello,

    I have a raspi running in other country without GUI - only CLI.
    Dyndns and other are not working because ipv4 over ipv6.
    After installing anydesk i can connect to the raspi, but my client says "display server not supported".

    Is ther any chance to connect to the CLI of my raspi?


    Jan


    --
    If you want to email me, replace nospam with el

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dr Eberhard Lisse@3:770/3 to Chris Green on Tue Oct 27 14:10:10 2020
    Chris,

    I might have use for something like this (for a host which I can access
    via AnyDesk, but not SSH, at the moment.

    Where can one read up on how to do this?

    el

    On 27/10/2020 12:28, Chris Green wrote:
    Jan Novak <repcom@gmail.com> wrote:
    [...]
    So you need to set up reverse tunnel outgoing connections from your
    Pi, this you have to do with access to it of course. Then, once that's
    done you can access it using ssh from 'outside'.

    If you want to know more then just ask.



    --
    If you want to email me, replace nospam with el

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Dr Eberhard Lisse on Tue Oct 27 12:34:48 2020
    Dr Eberhard Lisse <nospam@lisse.na> wrote:

    On 27/10/2020 12:28, Chris Green wrote:
    Jan Novak <repcom@gmail.com> wrote:
    [...]
    So you need to set up reverse tunnel outgoing connections from your
    Pi, this you have to do with access to it of course. Then, once that's
    done you can access it using ssh from 'outside'.

    If you want to know more then just ask.


    I might have use for something like this (for a host which I can access
    via AnyDesk, but not SSH, at the moment.

    Where can one read up on how to do this?

    In various places, it's not really "all in one place".

    If you look for 'ssh reverse tunnel' you will find how to do the ssh
    bit. Basically it uses the -R option of ssh so that a 'remote' system
    you have connected to from your Pi using ssh can connect back through
    the same connection *to* the Pi.

    The ssh man page explains it moderately well but you might want to try searching for some examples as well, you do need a clear mind to set
    it up right. :-)

    My Beaglebone Black (the system like a Pi) is on a boat in France
    behind a commercial WiFi system, so I run the following on it:-

    ssh -nNT -R 51236:localhost:22 chris@<myhost>

    This connects port 22 (the sshd server port) on the Beaglebone to port
    51236 on myhost. Then all you need to do is connect to port 51236 on
    myhost and you actually connect to the Beaglebone. I.e. you just do
    'ssh -p 51236 localhost' on myhost to connect through the reverse
    tunnel. The 51236 is just a random port number, greater than 1024 so
    that it can be used by a non-root process.


    To make this more robust I use a litte utility called autossh on the
    Beaglebone to make the outgoing connections, this restarts ssh if it
    dies, etc. You can find out about that by searching too and it's
    rather less confusing so I won't say any more here.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jan Novak@3:770/3 to All on Tue Oct 27 14:42:03 2020
    Am 27.10.20 um 13:07 schrieb Dr Eberhard Lisse:
    AnyDesk is a remote desktop viewer and doesn't do CLI.


    oha... ok, i was not shure about this feature.#. Thx.

    Jan

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Tue Oct 27 16:54:58 2020
    Den 2020-10-27 kl. 16:40, skrev Martin Gregorie:

    I'm not knocking your approach, simply curious about what problems
    reverse SSH solves that using a firewall or a suitably configured copy of sshd can't handle.


    To setup a ssh-tunnel like that could be a way of fighting ISIT/admins?
    Usually you can break out from a network, but you need someone else to
    do NAT/port forwarding if network owned by someone else.
    And they might refuse?


    --
    Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Chris Green on Tue Oct 27 15:40:10 2020
    On Tue, 27 Oct 2020 12:34:48 +0000, Chris Green wrote:

    Dr Eberhard Lisse <nospam@lisse.na> wrote:

    On 27/10/2020 12:28, Chris Green wrote:
    Jan Novak <repcom@gmail.com> wrote:
    [...]
    So you need to set up reverse tunnel outgoing connections from your
    Pi, this you have to do with access to it of course. Then, once
    that's done you can access it using ssh from 'outside'.

    If you want to know more then just ask.


    I might have use for something like this (for a host which I can access
    via AnyDesk, but not SSH, at the moment.

    Where can one read up on how to do this?

    In various places, it's not really "all in one place".

    If you look for 'ssh reverse tunnel' you will find how to do the ssh
    bit. Basically it uses the -R option of ssh so that a 'remote' system
    you have connected to from your Pi using ssh can connect back through
    the same connection *to* the Pi.

    The ssh man page explains it moderately well but you might want to try searching for some examples as well, you do need a clear mind to set it
    up right. :-)

    My Beaglebone Black (the system like a Pi) is on a boat in France behind
    a commercial WiFi system, so I run the following on it:-

    ssh -nNT -R 51236:localhost:22 chris@<myhost>

    This connects port 22 (the sshd server port) on the Beaglebone to port
    51236 on myhost. Then all you need to do is connect to port 51236 on
    myhost and you actually connect to the Beaglebone. I.e. you just do
    'ssh -p 51236 localhost' on myhost to connect through the reverse
    tunnel. The 51236 is just a random port number, greater than 1024 so
    that it can be used by a non-root process.


    To make this more robust I use a litte utility called autossh on the Beaglebone to make the outgoing connections, this restarts ssh if it
    dies, etc. You can find out about that by searching too and it's rather
    less confusing so I won't say any more here.

    Chris,

    Why not simply run sshd on the RPi?

    I do that on my LAN. ssh, git and gftp (using sftp protocol) all connect
    to my RPi successfully. Presumable

    So, why use the reverse SSH setup rather than running sshd behind a
    firewall on the RPi with the firewall configured to only accept
    connections from your other systems?

    Or configure the sshd server to only accept connections from IP addresses and/or hostnames that you control rather than using the firewall to do
    that?

    I'm not knocking your approach, simply curious about what problems
    reverse SSH solves that using a firewall or a suitably configured copy of
    sshd can't handle.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Tue Oct 27 15:56:12 2020
    On 27/10/2020 15:40, Martin Gregorie wrote:
    On Tue, 27 Oct 2020 12:34:48 +0000, Chris Green wrote:

    Dr Eberhard Lisse <nospam@lisse.na> wrote:

    On 27/10/2020 12:28, Chris Green wrote:
    Jan Novak <repcom@gmail.com> wrote:
    [...]
    So you need to set up reverse tunnel outgoing connections from your
    Pi, this you have to do with access to it of course. Then, once
    that's done you can access it using ssh from 'outside'.

    If you want to know more then just ask.


    I might have use for something like this (for a host which I can access
    via AnyDesk, but not SSH, at the moment.

    Where can one read up on how to do this?

    In various places, it's not really "all in one place".

    If you look for 'ssh reverse tunnel' you will find how to do the ssh
    bit. Basically it uses the -R option of ssh so that a 'remote' system
    you have connected to from your Pi using ssh can connect back through
    the same connection *to* the Pi.

    The ssh man page explains it moderately well but you might want to try
    searching for some examples as well, you do need a clear mind to set it
    up right. :-)

    My Beaglebone Black (the system like a Pi) is on a boat in France behind
    a commercial WiFi system, so I run the following on it:-

    ssh -nNT -R 51236:localhost:22 chris@<myhost>

    This connects port 22 (the sshd server port) on the Beaglebone to port
    51236 on myhost. Then all you need to do is connect to port 51236 on
    myhost and you actually connect to the Beaglebone. I.e. you just do
    'ssh -p 51236 localhost' on myhost to connect through the reverse
    tunnel. The 51236 is just a random port number, greater than 1024 so
    that it can be used by a non-root process.


    To make this more robust I use a litte utility called autossh on the
    Beaglebone to make the outgoing connections, this restarts ssh if it
    dies, etc. You can find out about that by searching too and it's rather
    less confusing so I won't say any more here.

    Chris,

    Why not simply run sshd on the RPi?

    I do that on my LAN. ssh, git and gftp (using sftp protocol) all connect
    to my RPi successfully. Presumable

    So, why use the reverse SSH setup rather than running sshd behind a
    firewall on the RPi with the firewall configured to only accept
    connections from your other systems?

    I have sshd running wide open on two public servers. Although they are
    attacked constantly - several per second attempts - no one has ever
    guessed my username and password, which is the only one that allows a
    login...

    ..and if someone does, then I will restore from backup and change them....

    People are too precious about security.
    Or configure the sshd server to only accept connections from IP addresses and/or hostnames that you control rather than using the firewall to do
    that?
    Heck I run NFS over the internet with just access allowed from my
    private IP range

    I don't see why if he wants to see a desktop on the Pi remotely he does
    not just run an X server to a remote client.
    Its slow, but it does work.

    Or build a web app that allows you do to what you need on the remote systems

    Essentially that's how I run my servers - web apps, NFS and in extremis
    ssh and su - root...


    I'm not knocking your approach, simply curious about what problems
    reverse SSH solves that using a firewall or a suitably configured copy of sshd can't handle.


    I think that you can tell sshd to reject name/password in favour of some massive length key...that is more secure than a password...


    --
    "When one man dies it's a tragedy. When thousands die it's statistics."

    Josef Stalin

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Alfter@3:770/3 to martin@mydomain.invalid on Tue Oct 27 16:25:47 2020
    In article <rn9f0q$kc6$1@dont-email.me>,
    Martin Gregorie <martin@mydomain.invalid> wrote:
    So, why use the reverse SSH setup rather than running sshd behind a
    firewall on the RPi with the firewall configured to only accept
    connections from your other systems?

    It sounded like he had things set up like that because the system in
    question is behind a firewall that he doesn't control. I didn't know ssh
    could be used in that way...clever. I don't have anything positioned where such a trick would be useful (I have control of firewall settings at home
    and at work, so I just forward an external port to port 22 on the device and call it good), but when you need it, you *need* it.

    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Alfter@3:770/3 to tnp@invalid.invalid on Tue Oct 27 16:35:22 2020
    In article <rn9fus$ags$1@dont-email.me>,
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I have sshd running wide open on two public servers. Although they are >attacked constantly - several per second attempts - no one has ever
    guessed my username and password, which is the only one that allows a >login...

    If you're logging into a public-facing server with your password, you're
    doing it wrong. Read up on SSH public-key authentication, and set it up.
    It's easy, and it's more secure than passwords.

    Also, if you don't already have it, set up fail2ban. It'll ban IPs that
    hammer your SSH server.

    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Scott Alfter on Tue Oct 27 16:56:31 2020
    On Tue, 27 Oct 2020 16:25:47 +0000, Scott Alfter wrote:

    In article <rn9f0q$kc6$1@dont-email.me>,
    Martin Gregorie <martin@mydomain.invalid> wrote:
    So, why use the reverse SSH setup rather than running sshd behind a >>firewall on the RPi with the firewall configured to only accept
    connections from your other systems?

    It sounded like he had things set up like that because the system in
    question is behind a firewall that he doesn't control. I didn't know
    ssh could be used in that way...clever. I don't have anything
    positioned where such a trick would be useful (I have control of
    firewall settings at home and at work, so I just forward an external
    port to port 22 on the device and call it good), but when you need it,
    you *need* it.

    I meant a local firewall on the RPi - the fact that he can make the
    connection at all means, I think, that any sitewide firewall between him
    and the RPi must understand references to machines behind it in order to
    pass incoming ssh connection requests to the appropriate machine on the
    remote LAN.

    So, I'm still curious because regardless of whether the RPi is doing the
    'ssh -R' trick or running an sshd server, its still only advertising an
    open ssh port (22) and the system running Anydesk still has to know the
    IP of the RPi or access it via some sort of address translation mechanism
    which hasn't been described so far.


    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Martin Gregorie on Tue Oct 27 17:38:26 2020
    Martin Gregorie <martin@mydomain.invalid> wrote:
    Chris,

    Why not simply run sshd on the RPi?

    Because there's no "way in" from the outside, it's behind several
    layers of NAT (or NAT alike) firewall that you (or I) have no control
    over. Therefore there is no hostname or IP address to connect to from
    outside.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Scott Alfter on Tue Oct 27 17:53:34 2020
    On 27/10/2020 16:35, Scott Alfter wrote:
    In article <rn9fus$ags$1@dont-email.me>,
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I have sshd running wide open on two public servers. Although they are
    attacked constantly - several per second attempts - no one has ever
    guessed my username and password, which is the only one that allows a
    login...

    If you're logging into a public-facing server with your password, you're doing it wrong. Read up on SSH public-key authentication, and set it up. It's easy, and it's more secure than passwords.

    I use that mostly, yes. But I leave the odd backdoor open for when I am
    away from all devices that I own...


    Also, if you don't already have it, set up fail2ban. It'll ban IPs that hammer your SSH server.

    To be honest, I am not sure that the fail2ban uses any less cycles than
    sshd when rejecting rubbish


    Let's put it this way. The amount of CPU and RAM used in rejecting
    ratware is less than is used in rejecting attempts to sntp relay and so on.

    I make a point of not fixing problems I don't have.



    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on
    Usenet?



    --
    Labour - a bunch of rich people convincing poor people to vote for rich
    people by telling poor people that "other" rich people are the reason
    they are poor.

    Peter Thompson

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Chris Green on Tue Oct 27 18:04:16 2020
    On Tue, 27 Oct 2020 17:38:26 +0000, Chris Green wrote:

    Martin Gregorie <martin@mydomain.invalid> wrote:
    Chris,

    Why not simply run sshd on the RPi?

    Because there's no "way in" from the outside, it's behind several layers
    of NAT (or NAT alike) firewall that you (or I) have no control over. Therefore there is no hostname or IP address to connect to from outside.

    Fair enough. Thanks to the answer.



    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to b.f.lundin@gmail.com on Tue Oct 27 17:39:51 2020
    Björn Lundin <b.f.lundin@gmail.com> wrote:
    Den 2020-10-27 kl. 16:40, skrev Martin Gregorie:

    I'm not knocking your approach, simply curious about what problems
    reverse SSH solves that using a firewall or a suitably configured copy of sshd can't handle.


    To setup a ssh-tunnel like that could be a way of fighting ISIT/admins? Usually you can break out from a network, but you need someone else to
    do NAT/port forwarding if network owned by someone else.
    And they might refuse?

    No port forwarding is needed, that's much of the point. The
    connection goes 'back' through the standard outward ssh connection.


    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Chris Green on Tue Oct 27 18:36:09 2020
    On Tue, 27 Oct 2020 17:39:51 +0000
    Chris Green <cl@isbd.net> wrote:

    No port forwarding is needed, that's much of the point. The
    connection goes 'back' through the standard outward ssh connection.

    This is why places that really care about security block outgoing
    ssh.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Martin Gregorie on Tue Oct 27 19:45:57 2020
    Martin Gregorie <martin@mydomain.invalid> wrote:
    On Tue, 27 Oct 2020 16:25:47 +0000, Scott Alfter wrote:

    In article <rn9f0q$kc6$1@dont-email.me>,
    Martin Gregorie <martin@mydomain.invalid> wrote:
    So, why use the reverse SSH setup rather than running sshd behind a >>firewall on the RPi with the firewall configured to only accept >>connections from your other systems?

    It sounded like he had things set up like that because the system in question is behind a firewall that he doesn't control. I didn't know
    ssh could be used in that way...clever. I don't have anything
    positioned where such a trick would be useful (I have control of
    firewall settings at home and at work, so I just forward an external
    port to port 22 on the device and call it good), but when you need it,
    you *need* it.

    I meant a local firewall on the RPi - the fact that he can make the connection at all means, I think, that any sitewide firewall between him
    and the RPi must understand references to machines behind it in order to
    pass incoming ssh connection requests to the appropriate machine on the remote LAN.

    Using an ssh reverse tunnel will get one through just about *any*
    firewall. All the firewall/routers can see is ssh traffic going the
    'normal way' from the client behind the firewall to wherever the
    server is.


    So, I'm still curious because regardless of whether the RPi is doing the
    'ssh -R' trick or running an sshd server, its still only advertising an
    open ssh port (22) and the system running Anydesk still has to know the
    IP of the RPi or access it via some sort of address translation mechanism which hasn't been described so far.

    It's advertising an sshd server port but that port is 'exported' via
    the reverse tunnel which is created by an ssh *client* running on the
    same system. So when a remote client is trying to connect it doesn't
    need to know anything about the RPi system at all, only a port number
    on 'localhost' of the system where it is.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Scott Alfter on Tue Oct 27 19:40:58 2020
    Scott Alfter <scott@alfter.diespammersdie.us> wrote:
    In article <rn9f0q$kc6$1@dont-email.me>,
    Martin Gregorie <martin@mydomain.invalid> wrote:
    So, why use the reverse SSH setup rather than running sshd behind a >firewall on the RPi with the firewall configured to only accept
    connections from your other systems?

    It sounded like he had things set up like that because the system in
    question is behind a firewall that he doesn't control. I didn't know ssh could be used in that way...clever. I don't have anything positioned where such a trick would be useful (I have control of firewall settings at home
    and at work, so I just forward an external port to port 22 on the device and call it good), but when you need it, you *need* it.

    You have it exactly right! :-)

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Chris Green on Wed Oct 28 09:28:19 2020
    On 27-10-2020 13:34, Chris Green wrote:
    My Beaglebone Black (the system like a Pi) is on a boat in France
    behind a commercial WiFi system, so I run the following on it:-

    ssh -nNT -R 51236:localhost:22 chris@<myhost>

    This connects port 22 (the sshd server port) on the Beaglebone to port
    51236 on myhost. Then all you need to do is connect to port 51236 on
    myhost and you actually connect to the Beaglebone.

    Ah yes, I always wanted to look into this for a Raspberry Pi I have
    somewhere else behind double NAT (carrier grade NAT). Thanks!

    So you <myhost> should always be up, right? Or is this robust enough to reconnect within reasonable time of <myhost> is down for a while?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Wed Oct 28 10:01:30 2020
    Den 2020-10-28 kl. 09:28, skrev A. Dumas:

    So you <myhost> should always be up, right? Or is this robust enough to reconnect within reasonable time of <myhost> is down for a while?

    That is why he wrote he uses autossh
    <https://linux.die.net/man/1/autossh>

    It reestablished the tunnel if needed

    --
    Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to The Natural Philosopher on Wed Oct 28 08:22:31 2020
    On 27/10/2020 17:53, The Natural Philosopher wrote:
    On 27/10/2020 16:35, Scott Alfter wrote:
    In article <rn9fus$ags$1@dont-email.me>,
    The Natural Philosopher  <tnp@invalid.invalid> wrote:
    I have sshd running wide open on two public servers. Although they are
    attacked constantly - several per second attempts - no one has ever
    guessed my username and password, which is the only one that allows a
    login...

    If you're logging into a public-facing server with your password, you're
    doing it wrong.  Read up on SSH public-key authentication, and set it up. >> It's easy, and it's more secure than passwords.

    Seconded.

    I use that mostly, yes. But I leave the odd backdoor open for when I am
    away from all devices that I own...


    Also, if you don't already have it, set up fail2ban.  It'll ban IPs that
    hammer your SSH server.

    A lighter weight alternative if you only have a limited set of ports
    exposed to the world is sshguard.

    To be honest, I am not sure that the fail2ban uses any less cycles than
    sshd when rejecting rubbish


    Let's put it this way. The amount of CPU and RAM used in rejecting
    ratware is less than is used in rejecting attempts to sntp relay and so on.

    Rejecting the connection at IP firewall level takes far less resources
    then allowing an ssh session to be negotiated then failing after the
    other end tries to login as root with a number of different common
    passwords.

    I make a point of not fixing problems I don't have.

    See how big your auth log can get to if you don't.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to druck on Wed Oct 28 08:54:44 2020
    On 28/10/2020 08:22, druck wrote:
    On 27/10/2020 17:53, The Natural Philosopher wrote:
    On 27/10/2020 16:35, Scott Alfter wrote:
    In article <rn9fus$ags$1@dont-email.me>,
    The Natural Philosopher  <tnp@invalid.invalid> wrote:
    I have sshd running wide open on two public servers. Although they are >>>> attacked constantly - several per second attempts - no one has ever
    guessed my username and password, which is the only one that allows a
    login...

    If you're logging into a public-facing server with your password, you're >>> doing it wrong.  Read up on SSH public-key authentication, and set it
    up.
    It's easy, and it's more secure than passwords.

    Seconded.

    I use that mostly, yes. But I leave the odd backdoor open for when I
    am away from all devices that I own...


    Also, if you don't already have it, set up fail2ban.  It'll ban IPs that >>> hammer your SSH server.

    A lighter weight alternative if you only have a limited set of ports
    exposed to the world is sshguard.

    To be honest, I am not sure that the fail2ban uses any less cycles
    than sshd when rejecting rubbish


    Let's put it this way. The amount of CPU and RAM used in rejecting
    ratware is less than is used in rejecting attempts to sntp relay and
    so on.

    Rejecting the connection at IP firewall level takes far less resources
    then allowing an ssh session to be negotiated then failing after the
    other end tries to login as root with a number of different common
    passwords.

    I make a point of not fixing problems I don't have.

    See how big your auth log can get to if you don't.

    Again, there is no shortage of disk space and it gets rotated.


    ---druck



    --
    Truth welcomes investigation because truth knows investigation will lead
    to converts. It is deception that uses all the other techniques.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to A. Dumas on Wed Oct 28 09:10:33 2020
    A. Dumas <alexandre@dumas.fr.invalid> wrote:
    On 27-10-2020 13:34, Chris Green wrote:
    My Beaglebone Black (the system like a Pi) is on a boat in France
    behind a commercial WiFi system, so I run the following on it:-

    ssh -nNT -R 51236:localhost:22 chris@<myhost>

    This connects port 22 (the sshd server port) on the Beaglebone to port 51236 on myhost. Then all you need to do is connect to port 51236 on myhost and you actually connect to the Beaglebone.

    Ah yes, I always wanted to look into this for a Raspberry Pi I have
    somewhere else behind double NAT (carrier grade NAT). Thanks!

    So you <myhost> should always be up, right? Or is this robust enough to reconnect within reasonable time of <myhost> is down for a while?

    If you use autossh it will cope with a 'not always there' myhost.
    However in my case I have an intermediate 'ssh bridge' system which is
    a virtual host on a commercial hosting provide so it is always there.

    The 'ssh bridge' is to protect my home system from incessant ssh
    attacks, my home system's firewall allows connections only from two or
    three IPs, one of which is the ssh bridge.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Ahem A Rivet's Shot on Wed Oct 28 09:05:33 2020
    Ahem A Rivet's Shot <steveo@eircom.net> wrote:
    On Tue, 27 Oct 2020 17:39:51 +0000
    Chris Green <cl@isbd.net> wrote:

    No port forwarding is needed, that's much of the point. The
    connection goes 'back' through the standard outward ssh connection.

    This is why places that really care about security block outgoing ssh.

    So use another port that isn't blocked.

    If you're really concerned about security then you don't allow *any* connections to the outside world. If you do allow connections then
    ssh is likely the least of your worries! :-)

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From alister@3:770/3 to Chris Green on Wed Oct 28 09:29:38 2020
    On Wed, 28 Oct 2020 09:05:33 +0000, Chris Green wrote:

    Ahem A Rivet's Shot <steveo@eircom.net> wrote:
    On Tue, 27 Oct 2020 17:39:51 +0000 Chris Green <cl@isbd.net> wrote:

    No port forwarding is needed, that's much of the point. The
    connection goes 'back' through the standard outward ssh connection.

    This is why places that really care about security block
    outgoing
    ssh.

    So use another port that isn't blocked.

    If you're really concerned about security then you don't allow *any* connections to the outside world. If you do allow connections then ssh
    is likely the least of your worries! :-)

    Indeed damage cause by outbound ssh will be because of deliberate action
    by a member of staff, in which case all bets are off anyway

    Outbound connections to Web pages are more likely to be the cause of
    accidental damage (virus & malware etc.)
    unfortunately blocking them does tend to make having any form of internet connection mostly unusable

    blocking all outbound traffic usualy just causes headaches when someone
    needs to legitimately use a new service that had not been foreseen.

    In my experience IT teams are notoriously obstructive to making changes &
    slow to deliver when their hand is forced.



    --
    /*
    * At first I thought these guys were on crack, but then I discovered the
    * LART.
    */

    - comment from include/linux/mtd/cfi_endian.h

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From alister@3:770/3 to The Natural Philosopher on Wed Oct 28 09:35:01 2020
    On Wed, 28 Oct 2020 08:54:44 +0000, The Natural Philosopher wrote:

    On 28/10/2020 08:22, druck wrote:
    On 27/10/2020 17:53, The Natural Philosopher wrote:
    On 27/10/2020 16:35, Scott Alfter wrote:
    In article <rn9fus$ags$1@dont-email.me>,
    The Natural Philosopher  <tnp@invalid.invalid> wrote:
    I have sshd running wide open on two public servers. Although they
    are attacked constantly - several per second attempts - no one has
    ever guessed my username and password, which is the only one that
    allows a login...

    If you're logging into a public-facing server with your password,
    you're doing it wrong.  Read up on SSH public-key authentication, and >>>> set it up.
    It's easy, and it's more secure than passwords.

    Seconded.

    I use that mostly, yes. But I leave the odd backdoor open for when I
    am away from all devices that I own...


    Also, if you don't already have it, set up fail2ban.  It'll ban IPs
    that hammer your SSH server.

    A lighter weight alternative if you only have a limited set of ports
    exposed to the world is sshguard.

    To be honest, I am not sure that the fail2ban uses any less cycles
    than sshd when rejecting rubbish


    Let's put it this way. The amount of CPU and RAM used in rejecting
    ratware is less than is used in rejecting attempts to sntp relay and
    so on.

    Rejecting the connection at IP firewall level takes far less resources
    then allowing an ssh session to be negotiated then failing after the
    other end tries to login as root with a number of different common
    passwords.

    I make a point of not fixing problems I don't have.

    See how big your auth log can get to if you don't.

    Again, there is no shortage of disk space and it gets rotated.


    ---druck


    Failtoban effectively shuts the port, which, if the hacker is monitoring
    what is happening lets him know that he cannot make any further attempts
    which will stop him bothering your system & move on.
    This should reduce the amount of waisted traffic your network has to deal
    with.

    it also reduces the time available for the hacker to identify any ssh
    exploits that may have been discovered

    Security in depth.



    --
    Be sociable. Speak to the person next to you in the unemployment line
    tomorrow.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to All on Wed Oct 28 13:09:23 2020
    On 28-10-2020 10:01, Björn Lundin wrote:
    Den 2020-10-28 kl. 09:28, skrev A. Dumas:

    So you <myhost> should always be up, right? Or is this robust enough
    to reconnect within reasonable time of <myhost> is down for a while?

    That is why he wrote he uses autossh
    <https://linux.die.net/man/1/autossh>

    It reestablished the tunnel if needed

    There is a difference between
    1. No answer when setting up the connection
    2. Remote machine dies
    3. Local process dies

    I figured autossh was at least good for 3, but I wasn't sure about 2
    (probably) or 1 (maybe).

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Chris Green on Wed Oct 28 12:18:52 2020
    On Wed, 28 Oct 2020 09:05:33 +0000
    Chris Green <cl@isbd.net> wrote:

    Ahem A Rivet's Shot <steveo@eircom.net> wrote:
    On Tue, 27 Oct 2020 17:39:51 +0000
    Chris Green <cl@isbd.net> wrote:

    No port forwarding is needed, that's much of the point. The
    connection goes 'back' through the standard outward ssh connection.

    This is why places that really care about security block
    outgoing ssh.

    So use another port that isn't blocked.

    Typically when this is done all ports are blocked, then some things
    are allowed through via proxies (including https with a MITM proxy) that
    allow enforcement of policies and monitoring of traffic.

    If you're really concerned about security then you don't allow *any* connections to the outside world. If you do allow connections then
    ssh is likely the least of your worries! :-)

    That's not too dissimilar to removing the power and embedding in concrete. Stick the work "unrestricted" between allow and connections and
    I'd agree.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to alister on Wed Oct 28 14:53:20 2020
    On 28/10/2020 09:35, alister wrote:
    On Wed, 28 Oct 2020 08:54:44 +0000, The Natural Philosopher wrote:

    On 28/10/2020 08:22, druck wrote:
    On 27/10/2020 17:53, The Natural Philosopher wrote:
    On 27/10/2020 16:35, Scott Alfter wrote:
    In article <rn9fus$ags$1@dont-email.me>,
    The Natural Philosopher  <tnp@invalid.invalid> wrote:
    I have sshd running wide open on two public servers. Although they >>>>>> are attacked constantly - several per second attempts - no one has >>>>>> ever guessed my username and password, which is the only one that
    allows a login...

    If you're logging into a public-facing server with your password,
    you're doing it wrong.  Read up on SSH public-key authentication, and >>>>> set it up.
    It's easy, and it's more secure than passwords.

    Seconded.

    I use that mostly, yes. But I leave the odd backdoor open for when I
    am away from all devices that I own...


    Also, if you don't already have it, set up fail2ban.  It'll ban IPs >>>>> that hammer your SSH server.

    A lighter weight alternative if you only have a limited set of ports
    exposed to the world is sshguard.

    To be honest, I am not sure that the fail2ban uses any less cycles
    than sshd when rejecting rubbish


    Let's put it this way. The amount of CPU and RAM used in rejecting
    ratware is less than is used in rejecting attempts to sntp relay and
    so on.

    Rejecting the connection at IP firewall level takes far less resources
    then allowing an ssh session to be negotiated then failing after the
    other end tries to login as root with a number of different common
    passwords.

    I make a point of not fixing problems I don't have.

    See how big your auth log can get to if you don't.

    Again, there is no shortage of disk space and it gets rotated.


    ---druck


    Failtoban effectively shuts the port, which, if the hacker is monitoring
    what is happening lets him know that he cannot make any further attempts which will stop him bothering your system & move on.
    This should reduce the amount of waisted traffic your network has to deal with.

    it also reduces the time available for the hacker to identify any ssh exploits that may have been discovered

    Security in depth.



    As I said, in ten years up, no breakins. I dont fix nonexistent problems

    --
    “The urge to save humanity is almost always only a false face for the
    urge to rule it.”
    – H. L. Mencken

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jan Novak@3:770/3 to All on Thu Oct 29 07:17:56 2020
    Am 27.10.20 um 16:40 schrieb Martin Gregorie:


    Why not simply run sshd on the RPi?

    I do that on my LAN. ssh, git and gftp (using sftp protocol) all connect
    to my RPi successfully. Presumable

    So, why use the reverse SSH setup rather than running sshd behind a
    firewall on the RPi with the firewall configured to only accept
    connections from your other systems?


    Because it is not available.
    ipv4 over ipv6.


    Jan

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Anssi Saari@3:770/3 to Jan Novak on Fri Oct 30 09:15:27 2020
    Jan Novak <repcom@gmail.com> writes:

    Am 27.10.20 um 16:40 schrieb Martin Gregorie:

    So, why use the reverse SSH setup rather than running sshd behind a
    firewall on the RPi with the firewall configured to only accept
    connections from your other systems?


    Because it is not available.
    ipv4 over ipv6.

    I guess you'll have to provide a little more detail on the network
    setup. Is it 4over6 tunneling you mean perhaps? At a guess that would
    look like any ipv4 connection with no unique public IP address that
    someone could connect to? But what about the ipv6 side then, shouldn't
    that be easy to connect to or is it blocked somehow as well?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)