- How to Allow VNC Ports. To access VNC on a public network (e.g. The Internet), you must forward the appropriate ports through your router/firewall. The exact steps are based on your specific router model. Here’s a basic guide to port-forward VNC Ports: Find the local IP Address of your PC running VNC Server.
- Server administration tools for Mac OS X Server v10.4 or earlier, including AppleShare IP: 687: TCP: Server administration — asipregistry: Server administration tools for Mac OS X Server v10.6 or earlier, including AppleShare IP: 749: TCP/UDP: Kerberos 5 admin/changepw — kerberos-adm — 985: TCP: NetInfo Static Port — — — 993: TCP.
Make sure that its configured for VNC access with a password. Then try to connect to TCP port 5900 with a VNC client on your PC. To answer the other question: VNC is the Mac answer to RDP, actually. Even the commercial 'Apple Remote Desktop' package ultimately uses the VNC protocol.
By: Sadequl Hussain | Updated: 2017-11-21 | Comments (1) | Related: More >Database Administration
Problem
I am a system administrator / DBA using a Windows laptop. I can remotely connectto our Windows servers from my laptop. Some of my colleagues are using non-Windowssystems like Mac or Linux. Sometimes they also need to access these boxes. How canthey connect?
Solution
System administrators or DBAs often need to access Windows servers remotely.This can be for various reasons like:
- Troubleshooting low disk space
- Running Performance Monitor or Profiler
- Monitoring Windows Event Viewer
- Applying service packs
- Creating and troubleshooting scheduled Windows jobs
- Installing software like SQL Server
- Connecting to another instance from a “jump host”
- Administering Active Directory
- Etc.
Windows ships with a tool called the “Remote Desktop Client” to helpconnect to another Windows machine. However, there are users who do not use a Windowsworkstation. Particularly with the spread of open source databases, cloud technologiesand the need for accessing Linux servers, a lot of engineers now use an Apple MacBookor Linux distributions like Fedora or Ubuntu.
Some of these engineers and administrators may need to access Windows hosts.It would make their job much simpler if they had tools similar to the RDP client.
In this tip we will talk about a few remote desktop clients available for Macand Linux. We will talk about their ease of use, features, etc. In a future post,we will talk about Mac and Linux-based database client tools.
Disclaimer
Please be careful when accessing production servers remotely. In most cases,organizations have strict security principles about who can access their servers,so readers need to follow those guidelines. Also, you should not run any commands,queries, or configurations from this tutorial on a production server. In the casewhen you are required to access remote servers and run commands, make sure you areconnected to the right server.
Although we list a number of remote clients from various vendors, this is byno means an exhaustive list. Nor do we endorse any of the products or have any affiliationwith their vendors. The observations made here are purely those of the author.
Also, this tip is not about how to install and configure remote desktop clients.Each software installer package will have its own requirements and dependenciesfor different operating systems; it’s not possible to address every issuewhere the package may be failing to install or the client failing to connect toa remote server. This is more of an overview of the tools available.
Remote Desktop Clients
Before going into details, let’s talk about the features we want in a remotedesktop client. We wanted tools which:
- Are free / open source or at least have a community edition available
- Have active development or product support
- Can map local resources like disk drives or folders to the remote machine
- Allow saving remote desktop sessions for easy future connection
- Allow different screen resolutions
- Enables clipboard sharing between local and remote machines
With these features in mind, let’s first see what’s available forMac users.
Mac Clients
Microsoft Remote Desktop
For Mac users, Microsoft has released the Microsoft Remote Desktop app, downloadablefrom theMac App store. The application features connection saving, easy searching ofsaved connections, connectivity to Azure RemoteApp and remote resources:
Creating a new connection is fairly simple and intuitive:
Standard features like mapping local directories to remote machine, sound andprinter forwarding are also present:
CoRD
Out next option for the Mac platform is CoRD,downloadable from its sourceforge site. CoRD is also easy to use and offers most features found in otherremote desktop tools.
The image below shows a local folder in a Mac system mapped to a remote Windowsmachine.
Royal TSX
Connect To Mac Using Vnc
Royal TSX is yet another tool available for Mac fromRoyalApplications. The latest version requires at least the Mac OS Yosemite operatingsystem.
What sets RoyalTSX apart is its ability to use plugins for different types ofconnectivity. These plugins are available from Royal Software as well. The remotedesktop client plugin is installed by default. Similarly, other connection typeslike VNC, SSH, HTTP or FTP can be installed with plugins, making it almost a universalconnectivity tool.
Royal TSX allows repetitive command tasks or key sequences to be run automaticallybefore, after or when a connection is made. The images below show this:
Some plugins allow Windows processes, services or events to be accessed remotely.However, this requires the RoyalTSX server component:
As the image below shows, connecting to a Windows server is fairly simple andstandard. The credentials for the connections need to be created first:
The free version of Royal TSX allows up to 10 remote connections. If you arenot managing dozens of Windows servers, the free version can be a good choice.
Linux Clients
Like Mac, there are remote desktop tools available for different flavors of Linux.To use these tools, needless to say, the Linux computer needs to be running in graphicalmode. Here are few of the tools to consider.
KRDC
KRDC or KDE Remote Desktop Client is available for Linux distros running K Desktop,like Fedora. The package is available from KDE repo, so it can be easily installedwith the following command:
KRDC has a simple interface. However, in our opinion, it lacks a basic featureexpected from any RDP client.
For example, once a connection is created, KRDC can “remember” theremote server’s username and password, provided it’s saved in the KDEWallet Manager application.
This obviously means installing another KDE application in your workstation.The default wallet it looks for is called “kdewallet” and in a vanillainstallation of KDE Wallet, users don’t know the password for that wallet,nor can they change it (at least we could not).
This means when connecting from the KRDC tool, users will be prompted for thewallet’s password if the “Remember password (KWallet)” optionwas chosen. Since users would not know the password, they have to bypass this bypressing the “Cancel” button:
Bypassing the wallet password prompt will result in the tool asking for the remoteuser’s password. Not a show-stopper perhaps, but to most regular users thiscan be a time-consuming affair.
Remmina
In our opinion, this is one of the best tools available for debian-based Linuxdistros, and can be downloaded from theRemmina GitHubrepo of FreeRDP. Unfortunately the installation page does not list any RedHat-baseddistros except Fedora. If you are using something like Ubuntu, Gentoo, Fedora orArchLinux, this tool should be yours.
The two images below show a remote Windows desktop displayed in Remmina runningin Ubuntu 16.10:
Other than RDP, this tool also supports NX, VNC and SSH protocols:
Some of the advanced features of Remmina connection properties are shown below:
Like RoyalTSX for Mac, this tool also allows for startup programs to run whena connection is made.
FreeRDP
Another tool from the same repo owner is FreeRDP, a command line tool to startremote desktop sessions. This is available from theGitHubpage of the product. FreeRDP is available for Ubuntu, Debian, Fedora, and OpenSuSEin Linux distributions and for Mac and even Windows. As said, this is a commandline tool, but has a large number of options available as switches.
We installed the tool in a Fedora 26 machine and were able to connect to a WindowsServer. The actual command is xfreerdp and it’s located in the /usr/bin directory.The following code snippet shows a basic form of the command and its output. Inthis case, we can safely ignore the warning:
Other Remote Desktop Sharing Protocols
So far, the tools we have talked about all use the remote desktop protocol. Thisis a proprietary protocol developed by Microsoft and ships with any Windows machine.It runs on port 3389 by default. However, this is not the only protocol availablefor remote connections. We will talk about two other protocols:
- VNC
- NX
VNC
VNC or Virtual Network Computing is a desktop sharing system using the RemoteFrame Buffer (RFB) protocol. Computers running a VNC server can be remotely connectedfrom other computers running a VNC client. This is a platform independent protocol,which means there are servers and clients available for Mac, Linux and Windows.This also means the same VNC client can connect to a remote Windows server or aLinux server, each of which could be running VNC as a service. In fact someof the RDP tools we have discussed so far like Remmina, KRDC or RoyalTSX - all featurea VNC client. The default port for VNC communication is 5900. For Java-based VNCclient, this is 5800.
Although VNC can be an alternative to remote desktop protocol, it means installationof additional software on the Windows server and configuring any firewall to allowtraffic on the VNC port.
Vnc On Mac
There are various VNC client and server packages available for free, some ofthese are:
- TightVNC
- TigerVNC
- RealVNC Home Edition
- UltraVNC
The image below shows the UltraVNC service running in a Windows Server 2016 machine.We downloaded it from UltraVNC’sofficial site.
And here are some of the UltraVNC service configurations:
The image below shows how we are using a TigerVNC Viewer client from a CentOS7.16 machine to connect to the Windows server running UltraVNC.
NX
NX is another remote desktop sharing protocol developed by a company called NoMachine(there are also open source variants like OpenNX and FreeNX). The tool, also calledNoMachine, allows some cool features like recording the remote desktop sessionsor streaming remote multimedia. Unlike VNC or RDP, NoMachine does not have separatesoftware installers for client and server: a NoMachine install creates both thecomponents. Once NoMachine is installed in a Windows server, make sure the serviceis running and the firewall is allowing traffic through the default port of 4000.
In the image below, we can see the nxservice (NoMachine server) running as aWindows service:
The following series of images show a NoMachine client running in Fedora settingup a remote Windows server connection:
Once the connection is set up, subsequent connections are easy: just select theconnection icon and click on the “Connect” button:
Once the credentials are provided (here we are using password authentication),there are a number of options to choose from for logon, display, resolution, sound,multimedia, etc.:
As you can see, NoMachine provides lot of options to configure how you interactwith the remote computer. Once you click through the options, the remote desktopis shown as a locked screen:
You can now press Ctl+Alt+0 to bring out the NoMachine menu, click on the littleicon in the lower right corner and choose Ctl+Alt+Delete from the pop-up menu, thenclick on the “Done” button:
This will bring up the Windows logon screen where you can put the remote server’saccess credentials.
Conclusion
One thing to remember when troubleshooting remote desktop session issues is thenetworking layer. For any remote desktop connection to succeed:
- The service component needs to be running in the remote machine, whetherit is remote desktop service, VNC or NX.
- The remote server needs to have a network path from the client: for example,we cannot remote desktop into a server if it’s only accessible from abastion host.
- The server’s firewall or other network protection layer has to allowremote desktop traffic coming from the client’s network. This is particularlytrue if the machine is running VNC or NX.
- When running the Windows remote desktop protocol and client, the user needsto be a member of the remote desktop users local Windows group other groupswith higher privileges.
- The network bandwidth needs to be good, particularly if there is a largegeographical distance between client and server.
We hope this tip has given you some ideas about choosing the right RDP tool.We leave it up to the reader to make their own choice. Feel free to comment aboutother non-Windows RDP clients you might be using in the comments section below.
Next Steps
If you are using a non-Windows workstation, consider the following:
- Download and install the RDP clients we talked about
- Test the limitations of the “free” editions; for example:
- How many remote sessions you can keep open or
- How many sessions you can save
Last Updated: 2017-11-21
![Vnc Vnc](/uploads/1/1/9/3/119320192/825632542.jpg)
About the author
Sadequl Hussain has been working with SQL Server since version 6.5 and his life as a DBA has seen him managing mission critical systems.
View all my tips
View all my tips
Skip to end of metadataGo to start of metadata
This article explains the process of enabling ssh and VNC access on a macOS device, and accessing the computer from a Windows computer
Set up Remote Login (ssh) on your Mac
- On your Mac, choose Apple menu > System Preferences, click Sharing, then select Remote Login.
- Select the Remote Login checkbox.
- Specify which users can log in:
- Only these users:Click the Add button,then choose who can log in remotely. Users & Groups includes all the users of your Mac. Network Users and Network Groups include people on your network.
Turn on screen sharing (VNC) on your Mac
- On your Mac, choose Apple menu > System Preferences, then click Sharing.
- IfRemote Managementis selected, deselect it.
- You can’t have both Screen Sharing and Remote Management on at the same time.
- Select the Screen Sharing checkbox.
- To specify who can share your screen, select:
- Only these users:Screen sharing is restricted to specific users.
- click the Add buttonat the bottom of the users list, then do one of the following:
- Select a user from Users & Groups, which includes all the users of your Mac except sharing-only users and guest users.
- Select a user from Network Users or Network Groups, which includes users and groups with network server accounts. Network users and members of network groups can use their network name and password to connect to your Mac for screen sharing.
- Click Computer Settings, then select the following:
- VNC viewers may control screen with password:Other users can share your screen using a VNC viewer app—on iPad or a Windows PC, for example—by entering the password you specify here. If you select this option, you should create a very secure password.
- This is required to be able to connect via TightVNC or RealVNC on a Windows device
- This is required to be able to connect via TightVNC or RealVNC on a Windows device
Setting Up PuTTY
If you want to know how to tunnel VNC through SSH, it’s recommended you usePuTTYto make the connection to your SSH server.
PuTTY offers a graphical user interface that can easily be configured to allow you to tunnel other software, like your VNC viewer, over the connection.
- To start, download PuTTY and open the client.
- The main Session menu allows you to type your macOS computer's hostname (i.e. ENG-ANC123456D). Type your SSH server address in the Host Name (or IP Address) text box. If your SSH port is different from the standard port 22, type this in the Port box.
- You’ll also want to save this session, so in the Saved Sessions text box, add a suitable name for your SSH connection, then click the Save button.
- In the left-hand menu, expand the Connection tab, then do the same for the SSH. Click on Tunnels.
- In the Port forwarding section of the Tunnels menu, you’ll be providing the details to allow PuTTY to tunnel your VNC connection over SSH. In the Source port text box, type 5900. In the Destination text box, type your remote address:5900, using the hostname of the remote desktop PC or server. For instance, ENG-ANC123456.coeit.osu.edu:5900 would be suitable. (IP address may be used instead of hostname, but the hostname is preferred because the IP may change)
- Return to the Session section, click on your saved session name under Saved Sessions, then click Save to save your settings.
- With your PuTTY settings ready, make the SSH connection by clicking Open at the bottom. You’ll be required to insert the username and password required to make your SSH connection as PuTTY makes the attempt.
- Once the login process is complete, you’ll be given access to the SSH terminal window for your remote desktop.
With the SSH tunnel to your remote desktop server active, you’ll now be able to make a VNC connection. You can use any VNC client you choose, but this guide will run through how to connect usingTightVNC, a popular and free VNC client for Windows and Linux.
You can minimize PuTTY while the connection is active.
Connecting Using TightVNC
If your SSH connection is active, connecting using TightVNC is pretty simple. This assumes that your VNC server is running on your remote PC or server.
- Open TightVNC to begin. In the Connection section, type localhost::5900 or 127.0.0.1::5900 into the Remote Host text box. PuTTY is monitoring this port and will automatically forward this connection, when the attempt is made, to your remote server.
- You can configure your VNC connection further by clicking Options but, if you’re ready to connect, click Connect.
- You’ll be asked for your VNC server password (the password you set above in the Setup Remote Login setps), so provide this in the VNC Authentication pop-up window, then click OK.
If your SSH connection is working correctly, TightVNC should load your remote VNC desktop window, ready for you to use.