Allow user to set up an SSH tunnel, but nothing else

后端 未结 10 2148
小蘑菇
小蘑菇 2020-12-22 16:47

I\'d like to allow a user to set up an SSH tunnel to a particular machine on a particular port (say, 5000), but I want to restrict this user as much as possible. (Authentica

10条回答
  •  青春惊慌失措
    2020-12-22 16:57

    You will generate a key on the users machine via whatever ssh client they are using. pUTTY for example has a utility to do this exact thing. It will generate both a private and public key.

    The contents of the public key file generated will be placed in the authorized_keys file.

    Next you need to make sure that the ssh client is configured to use the private key that generated the public key. It's fairly straight forward, but slightly different depending on the client being used.

提交回复
热议问题