Score:0

How to provide a ssh user access to server from a limited number of machines?

br flag

I have an ubuntu 22.04 server. I have defined a few users to have ssh access over password to my server. I want to limit their access to server to the number of their machine. For example user A only can have access to server from two machines while user B can have access to server from three machines. And please keep in mind that the machines that user A and B are using only are provided with dynamic ips. ISP that we are getting our internet service from does not provide static ips.

cn flag
Ray
You can't. As you know, with dynamic IP addresses, the best you can do is give a range of IPs -- that doesn't help you. The only thing I can think of is to forbid passwords and allow only ssh keys. And then user A and user B creates a different ssh key for each of the machines. But this doesn't stop them from copying the private key to another machine and accessing your server from that.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.