I have two virtual machines VM1(Ubuntu) & VM2(Debian). VM1 has a single user "admin" & VM2 has two users "test1" & "test2". What I want is that only test1 was able to access VM1 through ssh whereas test2 user should not able to access VM1 through ssh.
i.e if I logged in as test1 user & type ssh admin@VM1host.com than remote machine should allow this user to access the machine(VM1) whereas if I'm logged in as test2 & try the same command than the remote machine(VM1) should restrict ssh access for this user.