1. 27
    1. 17

      I think it’s important to call out that if you:

      • have ForwardAgent turned on in your ssh_config file, or
      • are using the -A flag to ssh itself, say as part of a shell alias

      then you are giving the remote host you connect to access to the private keys in your SSH agent, often in a fashion where you will not even be informed that the remote host has accessed those keys. This is not to say that this SSH-based service is doing so, but it is good to understand the potential security implications of using SSH to connect to things that you do not own or control.

      1. 5

        To better understand the security implications: the remote host has access to ask the agent to use the private keys to sign some message; the remote host does not have access to retrieve the private keys.

        In some situations, these are equivalent; especially if there’s no server nonce challenge or time stamp embedded in the data to be signed, so that a malicious actor can pre-sign tens of thousands of messages. In current implementations of how SSH requires messages to be signed, they’re not equivalent and the malicious actor needs ongoing access to the agent, to get specific messages signed.

        Thus, quite frankly, I’d rather ssh from a secure box to a “less secure” box where I still want some onwards-connection to happen, but don’t trust every piece of software on that “less secure” box, than require that all the software be run locally, especially since we don’t have widespread usable capability systems to constrain local actors (although we’re slowly getting there, with things like Capsicum).

        None of which protects you in the slightest if the initial box is a laptop where you also run a web-browser. Game over.

      2. 4

        I would further recommend not doing that even when connecting to hosts you do control, in case they are compromised.

        You can add keys with ssh-add -c (or use something that does it automatically) to be prompted before any remote host is able to use your forwarding agent, and also only enable ForwardAgent for specific hosts in ~/.ssh/config with the default being off.

      3. 1

        Yes. Never, ever do that.

    2. 3

      You can do full VPN type stuff using SSH as well (no need for “poor man” type setups):


      ssh contains support for Virtual Private Network (VPN) tunnelling using the tun(4) network pseudo-device, allowing two networks to be joined securely. The sshd_config(5) configuration option PermitTunnel controls whether the server supports this, and at what level (layer 2 or 3 traffic).

      from ssh(1)

    3. 3

      Previous thread on ssh-chat, if anyone is curious: https://lobste.rs/s/lwmnsg/ssh_chat_shazow_net

    4. 2

      Note that the keystroke-by-keystroke traffic generate a high-bandwidth timing side channel that can be used to infer a substantial amount of what you are typing.

      1. 1

        Very interesting, I did a search and found this paper if anyone else is interested:


    5. 1

      Changed the title to “Why aren’t we using SSH for everything?” if anyone wants to update it. :)

      1. 2


        1. 7

          The tag makes no sense, either. This should be security and maybe networking; go isn’t featured at all.

          1. 1

            ssh-chat is written in go

        2. 3

          Thanks kyle!

    6. [Comment removed by author]