Difference between revisions of "BullDog Notes"
Russ hensel (talk | contribs) |
Russ hensel (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == What == | + | == What - Remote Access to Ubunto 18.04 == |
− | How do you work with a headless Ubuntu 18.04 system? | + | How do you work with a headless Ubuntu 18.04 system? I would like to make this easy so for me a remote desktop just like the local real |
− | desktop would be great. I think I have it but it has been hard to get there. | + | desktop would be great. I think I have now, it but it has been hard to get there. I would like to maintain as much security as possible. |
− | The access to the Ubuntu machine will be Windows 10. For me this is all inside my local network. | + | The access to the Ubuntu machine will be from Windows 10. For me this is all inside my local network. I have found 3 useful ways to do this on my system: |
+ | * Get command line access ( Putty and SSH ) | ||
+ | * Webmin, remote http web access. | ||
+ | * Full VNC desktop ( there are other remote desktops ) | ||
+ | * Why not just use option Share Desktop ? Because mine would not turn on thats why. Why it would not turn on, I was not able to figure out. | ||
− | + | Of these VNC is the most difficult, and the one I wanted, it will be discussed first. It also mentions tools that may be useful in other approaches. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | === VNC full Desktop -- My Goal === | |
− | === VNC full Desktop Goal === | ||
I would like to use VNC to access a Ubuntu 18.04 system from windows like I do with the Raspberry Pi. | I would like to use VNC to access a Ubuntu 18.04 system from windows like I do with the Raspberry Pi. | ||
Line 22: | Line 20: | ||
* Connect to the existing desktop | * Connect to the existing desktop | ||
* Keep the connection secure | * Keep the connection secure | ||
+ | * Stick to open source. | ||
This has been a bit of a struggle for a number of gotchas. | This has been a bit of a struggle for a number of gotchas. | ||
Line 34: | Line 33: | ||
* To get VNC working there seem to be various components. | * To get VNC working there seem to be various components. | ||
** VNC server | ** VNC server | ||
− | ** Desktop software ( there are many different ones, you may need to install -- however here I want to run on the default Ubuntu 18.04 desktop so | + | ** Desktop software ( there are many different ones, you may need to install -- however here I want to run on the default Ubuntu 18.04 desktop so, of course, it is already installed. ) |
** A way to connect to the VNC server -- many servers will only connect to localhost 127.0.0.1 so we will use vnc tunnelling to make a remote connection appear to be on localhost | ** A way to connect to the VNC server -- many servers will only connect to localhost 127.0.0.1 so we will use vnc tunnelling to make a remote connection appear to be on localhost | ||
Line 64: | Line 63: | ||
==== what ==== | ==== what ==== | ||
might this help gconf-editor | might this help gconf-editor | ||
+ | |||
+ | ==== System Control ==== | ||
+ | |||
+ | systemctl vs. service | ||
+ | |||
+ | * sudo systemctl stop httpd << The Apache server would stop and you'd be returned to the bash prompt. To start the same service, we'd issue the command: | ||
+ | |||
+ | * sudo systemctl start httpd << The service would start and you'd be returned to your bash prompt. | ||
+ | |||
+ | |||
+ | * sudo systemctl restart httpd << to restart the same service | ||
==== Ubuntu text editor ( gedit ) ==== | ==== Ubuntu text editor ( gedit ) ==== | ||
Line 125: | Line 135: | ||
* In Putty issue the command to start the VNC Server >> ./startvnc start | * In Putty issue the command to start the VNC Server >> ./startvnc start | ||
* Start the windows VNC viewer the one I used is VNC viewer from RealVNC ... because this is the one I use for the Rasberry Pi ( you need to have a configuration with the right ip address of the Ubuntu Machine the same as the one in Putty | * Start the windows VNC viewer the one I used is VNC viewer from RealVNC ... because this is the one I use for the Rasberry Pi ( you need to have a configuration with the right ip address of the Ubuntu Machine the same as the one in Putty | ||
+ | |||
+ | === Easiest, no Desktop Putty SSH === | ||
+ | |||
+ | * Install ssh on Ubuntu | ||
+ | |||
+ | * Run Putty on windows using the IP address of the Ubuntu machine | ||
+ | . | ||
=== Webmin Somewhat Graphical, Easier than Command Line === | === Webmin Somewhat Graphical, Easier than Command Line === | ||
Line 136: | Line 153: | ||
* Install >> sudo apt-get install webmin << seems to work on virtual machine but not real one ?? | * Install >> sudo apt-get install webmin << seems to work on virtual machine but not real one ?? | ||
− | * Start >> sudo /etc/webmin/start | + | * Start >> sudo /etc/webmin/start << you can do this thru putty, then open your browser |
+ | * Stop >> /etc/webmin/stop << not tested may need sudo | ||
+ | * Restart >>/etc/init.d/webmin restart | ||
* access on your browser >>https://192.168.0.95:10000/ not work:?? http://192.168.0.95:10000/ | * access on your browser >>https://192.168.0.95:10000/ not work:?? http://192.168.0.95:10000/ |
Latest revision as of 07:05, 6 June 2019
Contents
What - Remote Access to Ubunto 18.04[edit]
How do you work with a headless Ubuntu 18.04 system? I would like to make this easy so for me a remote desktop just like the local real desktop would be great. I think I have now, it but it has been hard to get there. I would like to maintain as much security as possible. The access to the Ubuntu machine will be from Windows 10. For me this is all inside my local network. I have found 3 useful ways to do this on my system:
- Get command line access ( Putty and SSH )
- Webmin, remote http web access.
- Full VNC desktop ( there are other remote desktops )
- Why not just use option Share Desktop ? Because mine would not turn on thats why. Why it would not turn on, I was not able to figure out.
Of these VNC is the most difficult, and the one I wanted, it will be discussed first. It also mentions tools that may be useful in other approaches.
VNC full Desktop -- My Goal[edit]
I would like to use VNC to access a Ubuntu 18.04 system from windows like I do with the Raspberry Pi.
- Connect to the existing desktop
- Keep the connection secure
- Stick to open source.
This has been a bit of a struggle for a number of gotchas.
Overview[edit]
As I understand it ( may not have figured it out all the way )
- VNC has a server ( run on the machine you wish to view ) and viewer ( run on the machine you wish to access).
- In addition to having several components there are many versions of VNC. Directions for each differ, and differ across versions of Linux. Make sure you directions match your software.
- I will focus on Tiger VNC and Ubuntu 18.04
- To get VNC working there seem to be various components.
- VNC server
- Desktop software ( there are many different ones, you may need to install -- however here I want to run on the default Ubuntu 18.04 desktop so, of course, it is already installed. )
- A way to connect to the VNC server -- many servers will only connect to localhost 127.0.0.1 so we will use vnc tunnelling to make a remote connection appear to be on localhost
Software Used[edit]
before installs
- sudo apt update
- sudo apt upgrade
Process viewer (htop)[edit]
- Why This will let you see what vnc software is running.
- Install >> sudo apt -install htop
- Run >> htop
- Exit >> ctrl-c
IfConfig[edit]
- Why see your server's tcp ip address
- Install >> sudo apt -install ??
- Run >> ifconfig
- Exit >> just ends
SSH[edit]
- Install >> sudo apt install openssh-server
what[edit]
might this help gconf-editor
System Control[edit]
systemctl vs. service
- sudo systemctl stop httpd << The Apache server would stop and you'd be returned to the bash prompt. To start the same service, we'd issue the command:
- sudo systemctl start httpd << The service would start and you'd be returned to your bash prompt.
- sudo systemctl restart httpd << to restart the same service
Ubuntu text editor ( gedit )[edit]
- Install >> apt-get -install ??
- Run >> htop
Ubuntu File Browser[edit]
Tiger VNC[edit]
- Note: there may already be vncserver software installed perhaps vineo ??
- Install >> sudo apt-get install tigervnc-scraping-server
- Install ( may not be needed ) >> sudo apt install tigervnc-standalone-server tigervnc-viewer
- Set password >>vncpasswd << gotcha, if run server with no password set. If this does not run find an install -- perhaps full tiger vnc to get it.
- Run gotcha >> x0tigervncserver << but gotcha, needs to be pointed to password file so
- Run >> x0tigervncserver -PasswordFile ~/.vnc/passwd
- Run gotcha this is not the scraping server may not be installed >> tigervncserver -xstartup /usr/bin/xterm
- Set password >>vncpasswd << gotcha, if run server with no password set it will not work.
- edit configuration file >> use file browser but .vnc is hidden so turn on hidden file abillity ( one of its menus )
- starting thru ssh with putty does not work ( get an authentication error, but can start locally )
- to start thru ssh install startup script as on https://www.howtoforge.com/tutorial/how-to-start-a-vnc-server-for-the-actual-display-scraping-with-tigervnc/ this script can be run thru putty
- sudo apt-get install git psmisc
- git clone https://github.com/sebestyenistvan/runvncserver
- cp ~/runvncserver/startvnc ~
- chmod +x ~/startvnc
- ./startvnc start
- Manual Page: may not be the best >> https://man.cx/x0tigervncserver(1)
- set password with >> vncpasswd
- see running servers >> vncserver -list
- what runs with command vncserver >> which vncserver
right answer is ??
/usr/bin/vncserver
- what about owner of the .Xauthority file, https://askubuntu.com/questions/772090/how-can-i-resolve-x11-problem-with-putty-if-i-have-this-error-putty-x11-proxy
PuTTY X11 proxy: Unsupported authorisation protocol
How to start a vnc server for the actual display (scraping) with TigerVNC https://www.howtoforge.com/tutorial/how-to-start-a-vnc-server-for-the-actual-display-scraping-with-tigervnc/
Workflow In Use[edit]
- Boot the Ubuntu machine, if powered off just power on, if you have access sudo reboot ?? or restart will boot it.
- Wait
- On the windows machine connect with Putty and log in with your password and id
- In Putty issue the command to start the VNC Server >> ./startvnc start
- Start the windows VNC viewer the one I used is VNC viewer from RealVNC ... because this is the one I use for the Rasberry Pi ( you need to have a configuration with the right ip address of the Ubuntu Machine the same as the one in Putty
Easiest, no Desktop Putty SSH[edit]
- Install ssh on Ubuntu
- Run Putty on windows using the IP address of the Ubuntu machine
.
Webmin Somewhat Graphical, Easier than Command Line[edit]
- rather than use the desktop use a web based admin tool:
- Website Webmin http://www.webmin.com/
- Install >> sudo apt-get install webmin << seems to work on virtual machine but not real one ??
- Start >> sudo /etc/webmin/start << you can do this thru putty, then open your browser
- Stop >> /etc/webmin/stop << not tested may need sudo
- Restart >>/etc/init.d/webmin restart
- access on your browser >>https://192.168.0.95:10000/ not work:?? http://192.168.0.95:10000/
How To Install Webmin on Ubuntu 18.04 | DigitalOcean https://www.digitalocean.com/community/tutorials/how-to-install-webmin-on-ubuntu-18-04 sudo nano /etc/apt/sources.list sudo gedit /etc/apt/sources.list