0

I dont want other users to access my machine through ssh and VNC.How to restrict this?As a admin i want to view and access all other system through ssh and VNC. Also only for my system ssh access should be enabled,is it possible to do this?

2 Answers 2

2

As for VNC, either don't install it or don't tell people that you don't want accessing it the password. You might also leave the option checked to prompt you for authorization when someone tries to use connect.

As for SSH, either don't give people an account, or configure sshd such that only you are allowed to use it. See the man page

1

If all you need are the SSH and VNC clients you can uninstall the servers. Most client-server packages such as these are packaged so you can install either one, or both.

There area a variety of methods to do restrict access to these servers. You can use one or more of them.

  • If you don't need incoming ssh access remove the openssh-server package.
  • sshd is built to include tcpwrappers so you can block ssh access by adding a line reading sshd: ALL except localhost to /etc/hosts.deny.
  • incoming ssh connections can be blocked using iptables. This can be done with ufw or you can install shorewall to build your firewall.
  • sshd has configuration options which can be used to configure which users and hosts can connect.

  • If you don't need VNC access to your host, you can remove the vncserver package.

  • If you need VNC access you can firewall access to the server so only a limited number of hosts can connect.
  • You can use xinetd to start the VNC server. It is built with tcpwrappers so you can restrict access with /etc/hosts.allow and /etc/hosts.deny.
  • You can use xrdp to start the VNC server and firewall access to the RDP port. I haven't checked whether tcpwrappers is available as I only allow VNC access on secure links.

I have written an article on Remote Desktops with VNC and RDP that may help if you need VNC access.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .