LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2020, 10:19 PM   #16
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75

Yep, that's right.
I can't find x11vnc in centos tree.
So try building this
https://sourceforge.net/projects/lib.../files/x11vnc/
If the latest one doesn't work just try a bit older ones. It may happen.
 
Old 04-13-2020, 10:19 PM   #17
L1P0
Member
 
Registered: Dec 2019
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tinfoil3d View Post
The safest setup would be running x11vnc under the user who is logged in to the desktop (if any) and running
Code:
x11vnc -localhost -forever
, then accessing it via ssh session like
Code:
ssh youroptions... youruser@yourserver -L127.0.0.1:5900:127.0.0.1:5900
and then just
Code:
vncviewer 127.0.0.1
The point is if you cannot find x11vnc for 4.8 you'll have to take it from sources and build it yourself.
It says:

Quote:
ksh: x11vnc: not found
I tried switching to bash shell, still:

Quote:
bash: x11vnc: not found
 
Old 04-13-2020, 10:22 PM   #18
L1P0
Member
 
Registered: Dec 2019
Posts: 33

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by tinfoil3d View Post
Yep, that's right.
I can't find x11vnc in centos tree.
So try building this
https://sourceforge.net/projects/lib.../files/x11vnc/
If the latest one doesn't work just try a bit older ones. It may happen.
That's why the x11vnc command was not found upon my attempt. I will study how to build things like this.. Thank you so much for sharing your knowledge!
 
Old 04-13-2020, 10:28 PM   #19
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
You just download that tar file to a remote box,
Code:
tar xf ..filename...
cd x11vnc-*
./configure
make
# then it would probably produce a x11vnc executable file somewhere, you can find it like this:
find -name x11vnc -type f
Then just run it as find command returns, appending -localhost -forever
It may report errors and exit, but if it doesn't exit, just connect to it through ssh tunnel you have created.
 
Old 04-13-2020, 11:56 PM   #20
L1P0
Member
 
Registered: Dec 2019
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tinfoil3d View Post
You just download that tar file to a remote box,
Code:
tar xf ..filename...
cd x11vnc-*
./configure
make
# then it would probably produce a x11vnc executable file somewhere, you can find it like this:
find -name x11vnc -type f
Then just run it as find command returns, appending -localhost -forever
It may report errors and exit, but if it doesn't exit, just connect to it through ssh tunnel you have created.

I successfully executed above commands/lines with no issues. Thanks a lot! About the ssh option.. what option should I use?

Code:
ssh [option] user@target -L127.0.0.1:5900:127.0.0.1:5900
Also, is this really
Code:
-L127.0.0.1:5900:127.0.0.1:5900
or just
Code:
-L127.0.0.1:5900
I can see an error:

Quote:
Bad forwarding specification '127.0.0.1:5900'
I really appreciate your time and help!

Last edited by L1P0; 04-13-2020 at 11:57 PM.
 
Old 04-14-2020, 12:00 AM   #21
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
try
Code:
ssh -L5900:127.0.0.1:5900 user@host
 
Old 04-14-2020, 12:18 AM   #22
L1P0
Member
 
Registered: Dec 2019
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tinfoil3d View Post
try
Code:
ssh -L5900:127.0.0.1:5900 user@host
after trying that, and vncviewer 127.0.0.1 , I got an error message:

Quote:
vncviewer: unable to make display ""

I looked in /var/log/messages but found no related logs..


##########

BTW, after issuing ./x11vnc -localhost -forever

it stuck at after line:

Quote:
check_xrandr_event: enabling full XANDR trapping anyway.

Last edited by L1P0; 04-14-2020 at 12:23 AM.
 
Old 04-14-2020, 01:11 AM   #23
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
ok, try running
Code:
DISPLAY=:0 ./x11vnc -localhost -forever
are you sure you have xorg running? can you maybe post your processes list
Code:
ps xuafwww
 
Old 04-14-2020, 04:14 AM   #24
L1P0
Member
 
Registered: Dec 2019
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thumbs up

Hi @tinfoil3d

Thanks a lot! I tried your most recent suggestion, but it still seems not working.
But hey, I tried this and it worked:

in the server side, i just issued:

Code:
/usr/bin/x11vnc -rfbauth ~/.vnc/passwd
Then, in the client side, I typed

Code:
vncviewer MY_HOSTNAME_HERE:1
And the remote connection successfully established!


Thank you so much for guiding me all throughout! Thanks for sharing your knowledge! I hope there will be more people like you.
Have a good day!
 
Old 04-14-2020, 04:19 AM   #25
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
np but there are two things to take care of.
what you did there is you opened an access from remote, even from "secure" lan opening vnc isn't a good idea as passwords are only 8 chars long.
next, there's that bruteforce attack going on in your network. you must take care of that.
 
Old 04-14-2020, 04:37 AM   #26
L1P0
Member
 
Registered: Dec 2019
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tinfoil3d View Post
np but there are two things to take care of.
what you did there is you opened an access from remote, even from "secure" lan opening vnc isn't a good idea as passwords are only 8 chars long.
next, there's that bruteforce attack going on in your network. you must take care of that.
Thanks for that.. But our network here is secured by VPN.

The unidentified ip address only shows up in the /var/log/messages after boot up. I tried booting up thrice. And the logs with that ip addr are appended right after bootup. I observed that after even few hrs, no logs with that ip address is being appended.

There are many things I should study!
 
Old 04-14-2020, 05:54 AM   #27
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
that's serious, you don't wont to shove that under the carpet and then receive request to pay bitcoins to decrypt your files a week later.
find out which computer has that IP, it may even be not explicitly assigned, say, a hacker gains control of 10.11.12.13 host and adds 10.11.12.14 ip by himself that wasn't used and then attacks from it, making all admins to run around trying to figure out who has that ip even though no one was assigned it.
 
  


Reply

Tags
vnc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC viewer showing black screen. unable to connect VNC server remotely on the server? cyberdome Linux - Server 1 08-01-2014 08:21 AM
VNC displays 'terminal window' that can't be closed after VNC connection to CentOS Hispacific Red Hat 1 10-15-2010 03:44 PM
Issue with vnc server "tightVNC: VNC server closed connection", due to Screensaver frenchn00b General 1 07-30-2009 06:55 AM
VNC Over SSH | Linux laptop -> Linux SSH Server -> Windows VNC Server jakestaby Linux - Networking 3 01-28-2009 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration