Vnc For Mac Port

  • »
  • »
  • Getting started

Contents

Downloading

The actual port is 5900 + 1 = 5901. So when you type vncserver:, vncserver is listening at 5900 +. I will continue with an example now. Let's say that our external IP is 12.13.14.15 and our internal IP is 192.168.0.20 and we want to run our VNC on port 12345. Vncserver must be run with number equal to =6445. TigerVNC was originally based on the (never-released) VNC 4 branch of TightVNC. More information regarding the motivation for creating this project can be found in the project announcement. The latest release of TigerVNC can be downloaded from our GitHub release page. Besides the source code we also provide self-contained binaries. The default port used for VNC is 5900 – you can increase your security by changing it to another port. People scanning for open VNC servers will try t o connect at port 5900, ut generally won’t notice VNC servers running on other random ports, such as 34153. Tap the icon to the right of your Mac's name in Jump. Edit the auth row on iOS or VNC Authentication row on Android make sure it says: vnc password. Save your settings and try connecting again. This time you should be prompted for your VNC Password. Enter it to connect.

VNC Enterprise Edition for Mac OS X is available for Mac OSX 10.3 and above and for both PPC and x86 processor architectures. Ifyou are not sure what type of processor your computer has, then youshould download the PPC version, which will run on eitherprocessor. However, for best performance, we recommend that you usethe correct version for your processor.

For either architecture, you can download an installer package(.pkg) containing both the server and viewer, or a diskimage (.dmg) containing just the viewer.

Installing

To install VNC Server Enterprise Edition for Mac OS X,double-click on the downloaded installer and follow the on-screeninstructions. You will need to restart your computer in order to runthe VNC Server in Service-Mode, but you can startusing it in User-Mode immediately.

Installing a License Key

When you first install the software, you will be prompted to install alicense key. To install a license key at any other time, run theInstall license key program from the VNC Server folderof Applications. You will be asked to enter an administratorpassword before a license key can be entered.

Enter the license key exactly as it appears in the email you receivedwhen you purchased the software (copy and paste is best). If you wouldlike to try the software before buying a license, then you can get a free 30-day trial.

The Status Bar Icon

If VNC Server is running, there will be an icon on the right-hand sideof the menu bar. Under normal circumstances, this icon has a whitebackground; however, when someone is connected to your computer, thebackground color of the icon changes to black to inform you ofthis. It is not possible to remove the status bar icon without closingVNC Server and disabling connections to your computer. Note that, inService-Mode, VNC Server continues to run even ifno-one is logged in locally. In this case, the status bar icon willappear when someone logs in.

As well as providing a visual indication of whether or not someone iscurrently connected to your computer, most administrative functionsare accessed using the status bar menu.

Service-Mode and User-Mode

VNC Server supports two modes of operation:

  • Service Mode
    • Runs when the computer starts up (unless configured otherwise).
    • Provides remote access even when no-one is logged in, or when allusers are switched out.
    • Only users with administrative privileges can stop or reconfigurethe server.
  • User Mode
    • Can be stopped and started 'on-demand' by any user when remoteaccess is needed.
    • Cannot provide remote access if no-one is logged in, or if allusers are switched out.
    • Each user has their own configuration settings and can modifythese freely.

To start VNC Server in either Service- or User-Mode, double-click onthe appropriate icon in the VNC Server folder ofApplications. To stop VNC Server in either Service- orUser-Mode, select Quit from the status bar menu. ForService-Mode, you will be prompted to enter administrative credentialsto stop or start VNC Server, and it will remember whether or not it isrunning across reboots.

Configuring

To configure the server, click on the status bar icon and selectPreferences... If you are configuring VNC Server inService-Mode, then you will be prompted to enter administrativecredentials.

It is intentionally the case that, if VNC Server is unconfigured,then no connections will be accepted. This is for securityreasons.

You must, at a minumum, configure your VNC Server's authentication andgenerate secure encryption keys before you will be able toconnect. There are three authentication options:

  • No Authentication—With this option, all connectionsto the server will be accepted without needing a username orpassword. This option should be used only with extreme caution; itshould not be used unless the host network is known to be completelysecure.
  • VNC Password Authentication—With this option, allconnections must supply a valid password before being accepted. Thisis the default authentication mode, but no password is set bydefault. To set the password, click the Configure button.
  • Mac Authentication—With this option, all connectionsmust supply a user name and password that are valid on the computerrunning VNC Server. To configure which users are allowed to access theserver, and the level of access they are granted, click theConfigure button.

You can also configure the preferred encryption setting:

  • Prefer On—Use encryption unless the VNC Viewerrequests otherwise.
  • Prefer Off—Don't use encryption unless the VNC Viewerrequests it.
  • Always On— Always use encryption. This optionprovides the highest security but you will not be able use legacy orthird-party VNC Viewers to connect if this option is selected.

Before you can connect to your VNC Server, you must generate secureencryption keys by clicking on the Generate Keys button. If youforget to do this, you will be prompted to generate encryption keyswhen you close the dialog.

You can also configure whether or not the local user can enable the'guest' login, and the level of access that guests are granted. Ifenabled, the local user can enable the 'guest' login from the statusbar menu, even if he or she does not otherwise have permission tomodify the VNC Server settings (for example, if it is running inService-Mode). The 'guest' login differs from other logins in that itdoes not normally have a password, and the local user is alwaysprompted to accept the connection, regardless of the setting ofPrompt local user to accept connections.

Finally, you can configure whether or not the local user will beprompted to accept each incoming connection and whether or not thisapplies even if no-one is logged on. Note that, when MacAuthentication is enabled, the local user will not be prompted if theconnecting user has the Connect without accept/reject promptpermission.

The Connections tab controls the port numbers through which theVNC Server is accessed and, optionally, the IP addresses from whichconnections are accepted. Note that port numbers below 1024 arereserved by the operating system for privileged processes and are notavailable unless you are running in Service-Mode.

  • Accept connections on port—Controls the port on whichconnections are accepted. Uncheck this option to disable connectionsto the server.
  • Disconnect idle clients after—Controls the length oftime after which clients from which no inputs have been received willbe disconnected. Set this to zero to disable idle timeouts.
  • Serve Java viewer via HTTP on port—Controls the porton which the Java viewer is served to web browsers.

It is also possible to configure a list of approved and/or blacklistedIP addresses. The details of this are beyond the scope of this guide;see the section entitled Access control: Allow, deny or queryaddresses in the VNC Server Enterprise forWindows documentation.

The Sharing tab controls how VNC Server handles multiplesimultaneous connections.

  • Always treat new connections as shared—Newconnections are treated as shared, regardless of the preference of theVNC Viewer.
  • Never treat new connections as shared—New connectionsare treated as non-shared (private), regardless of the preference ofthe VNC Viewer.
  • Use client's preferred setting—The preference of theVNC Viewer is used to determine whether or not a new connection shouldbe treated as shared.

The Non-shared connections replace existing ones optioncontrols the behaviour of non-shared sessions. If checked, then anyexisting connection will be closed when an incoming non-sharedconnection is received. If unchecked, then incoming non-sharedconnections will rejected if there is an existing connection.

The Misc tab contains various options that are not covered by any of the other tabs.

  • Accept pointer events from clients—Uncheck thisoption to ignore mouse input from VNC Viewers.
  • Accept keyboard events from clients—Uncheck thisoption to ignore keyboard input from VNC Viewers.
  • Accept clipboard events from viewers—Uncheck thisoption to ignore clipboard changes sent by VNC Viewers.
  • Send clipboard updates to clients—Uncheck this optionif you don't want changes to the local clipboard to be sent to VNCViewers.
  • Share files with clients—Uncheck this option if youwant to disable transferring of files to and from this computer usingVNC. If file transfer is enabled, it is accessed via the status barmenu.
  • Only use protocol 3.3—Check this option if you arehaving trouble connecting with legacy or third party viewers. You willnot be able to use any advanced features such as encryption or MacAuthentication; in most cases it is better to upgrade legacy or thirdparty viewers to Enterprise Edition.
  • Enable full debug logging—Check this option if youare encountering a problem. Detailed debug information will be loggedto the server errorlog. Ordinarily, only errors and details of connections arelogged.

Connecting

In order to connect to your computer, you will need to know its IPaddress. To display the current IP address, hover the mouse pointerover the VNC status bar icon. If your server is configured correctly,this will indicate whether the server is running in User- orService-Mode and tell you its IP address (however, see our port forwarding FAQ forfurther information if your computer is connected to the Internetthrough an external firewall or NAT router).

If you have changed the Accept connections on port setting,then you will need to specify this when connecting with VNCViewer. For example, if you have configured server snoopyto accept connections on port 80, then you would specifysnoopy::80 when connecting. Note the double-colon syntax;a single colon denotes a desktop number—for examplesnoopy:1 refers to desktop number 1 onsnoopy, which accepts connections on port 5901.

If your server is misconfigured and is unable to accept connections,then instead of your IP address, the tool-tip will instead say Notaccepting connections. In this case, check the server error log formore information.

File Transfer

Starting with version 4.3, VNC Enterprise Edition for Mac OS Xsupports file transfer. In order to transfer files, you must beconnected using a version of VNC Viewer that supports file transfer,for example VNC Viewer Enterprise or Personal Edition for anyplatform.

To transfer files from your VNC Server computer, selectShare Files... from the VNC Server status bar menu and browseto the file or directory that you want to copy. This makes the filesavailable to all connected viewers; to transfer them, use the F8 menuon UNIX and Mac platforms, or the clipboard on Windows platforms.

On Mac OS X 10.4 and above, you can copy a group of files ordirectories to the clipboard rather than using the status bar menu.

To transfer files to your VNC Server computer, first select thefiles using a connected VNC Viewer, using the F8 menu or clipboard,depending on the platform on which VNC Viewer is running. This makesthe files available to VNC Server; to transfer them, select FetchFiles... from the VNC Server status bar menu and choose thedownload location.

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.

Vnc

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

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).

Mac Vnc Server

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

Mac

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.

There are various VNC client and server packages available for free, some ofthese are:

Mac Vnc Port Number

  • 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:

Mac Os Vnc Server

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



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

Vnc