This content has been marked as final. Show 9 replies
Make sure to enable "require a password..." in the Remote Desktop Preference on the Linux system. Some clients won't work unless this is set. Unfortunately the Remote Desktop Preferences panel on the Linux side does not show you the port it is listening on, but you can get it by clicking on the IP or name that it shows as a link. The first user or vnc server is usually listening on port 5900, then 5901, and so on.
Your problem is probably the firewall on your Linux system. You can disable the firewall on the Linux system:
service iptables stop
However, probably a better idea, simply tunnel the connection through SSH as following:
On the Mac, open the Terminal application from the Applications/Utilities folder. Then type the following:
ssh -L local_port:localhost:remote_port -N -f -l username server_address
local_port = port on your Mac that does not conflict with any of your own screen-sharing or other services, e.g. 5555
remote_port = vnc server port on your Linux system
username = user for which you have enabled remote desktop sharing
server_address = ip address or FQDN of your Linux system.
ssh -L 5555:localhost:5900 -N -f -l root 10.0.1.2
The trick is now to connect to a local port on your Mac, instead using the address of your Linux server. The communication will be encrypted using ssh going over tcp port 22, which is normally enabled in the firewall.
The Mac screen sharing application is working fine. On your Mac, select "Go>Connect to Server" from the Finder menu and type:
thank you for your help!
your solution perfectly works fine! Can I ask more questions?!
1- Now I can not copy files when I remote connect to the sever. How can I do that?
- Can I Mounting Remote Folder?
2- what if I want to access my server over the internet?
- Is it possible to you some software like RealVNC?
- I am about to purchase a Dynamic DNS service and set it up on my firewall, can I use your solution over the internet then?
Thank you in advance
The solution using a ssh tunnel will work regardless of the VNC client software. If ssh works through your firewall, the tunneling of VNC will work too. Since ssh encrypts the connection, it is also suitable for communicating over the public internet. To transfer or copy files you can use the scp or sftp command, which is part of the ssh2 package. There are plenty of examples on the web. For remote mounting you can look into the fuse and sshsf package, which uses ssh to mount a remote directory, but it is not part of the standard distribution software.
I tried to install realvnc but during setup it says it has conflict with tiger VNC and can not be installed
To file transfer, I tried to find solution on the internet but it seems for different version of Linux, commands are different, Do you know any website specifically for oracle linux? Or maybe you can introduce me a book to learn all about Oracle Linux
For example I found this one but it did not work:
Mounting Remote Folder through SSH*
+$ sudo yum install sshfs+
Mount folder on sever to local folder
sshfs username@server:/path/to/folder /path/to/mount/point
Edited by: 957069 on Sep 13, 2012 3:48 PM
I tried to install realvnc but during setup it says it has conflict with tiger VNC and can not be installedI have no idea what exactly you tried to install or where. Apparently you have to choose between one or the other.
Regarding file sharing, like I previously wrote, sshsf it is not part of the standard software distribution. If you have more questions please start a new thread and explain what you would like to do. There is no general answer to sharing files and I doubt anyone here will explain you all the options that exist.