Advertisement
jay_lltv

mlh_remote_desktop_notes

Oct 27th, 2022
327
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 1 0
  1. # Build your own cloud desktop
  2.  
  3. ## What you'll need:
  4. * A linux instance, preferably with at least 4GB of RAM
  5. * XQuartz (macOS users only)
  6. * X2Go client installed (Windows, macOS, or Linux)
  7. * A terminal with an OpenSSH client (built-in for macOS and Linux users, use WSL for Windows)
  8. * Windows Services for Linux (Windows users only): https://learnlinux.link/wsl-dl
  9.  
  10. ## Links:
  11. * Linode (cloud provider used in this example): https://linode.com
  12. * XQuartz (macOS users only): https://learnlinux.link/xquartz
  13. * X2Go client: https://learnlinux.link/x2go-dl
  14.  
  15. ## Commands used
  16.  
  17. ### Add a user for yourself
  18. adduser <desired-username>
  19.  
  20. ### Add your user to the sudo group
  21. usermod -aG sudo <username>
  22.  
  23. ### Log in as your new user
  24. First, log out:
  25. exit
  26.  
  27. Then, log in as your new user:
  28. ssh <user>@ip
  29.  
  30. ### Set the hostname
  31. Edit the hostname file:
  32. sudo nano /etc/hostname
  33.  
  34. Change the name to whatever you want the name of your server to be.
  35.  
  36. Also, update the hosts file with your chosen hostname as well:
  37. sudo nano /etc/hosts
  38.  
  39. ### Install updates
  40. Update the package repository index:
  41. sudo apt update
  42.  
  43. Install all updates:
  44. sudo apt dist-upgrade
  45.  
  46. ### Reboot the server
  47. Now that all the updates are applied, we've created a user for yourselves, and we've updated the hostname, we should reboot the server. That was a lot of change! Run the reboot command to reboot the server:
  48. sudo reboot
  49.  
  50.  
  51. ### Security
  52. #### Install the unattended upgrades package:
  53. sudo apt install unattended-upgrades
  54.  
  55. #### Verify that it's running:
  56. systemctl status unattended-upgrades
  57.  
  58. #### Adjust configuration for unattended upgrades:
  59. sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
  60.  
  61. #### Enable automatic reboot:
  62. //Unattended-Upgrade::Automatic-Reboot "false";
  63. Uncomment by changing to:
  64. Unattended-Upgrade::Automatic-Reboot "true";
  65.  
  66. Also uncomment:
  67. Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
  68.  
  69.  
  70. #### Set a time for the automatic reboot to happen:
  71. // Unattended-Upgrade::Automatic-Reboot-Time "02:00";
  72. Change to (and adjust with your desired time):
  73. Unattended-Upgrade::Automatic-Reboot-Time "04:00";
  74.  
  75. #### Verify automatic updates are fully enabled:
  76. sudo nano /etc/apt/apt.conf.d/20auto-upgrades
  77.  
  78. Ensure both are set to 1.
  79.  
  80.  
  81. ### Install crowdsec
  82.  
  83. #### Add the repository:
  84. curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
  85.  
  86. #### Install Crowdsec:
  87. sudo apt install crowdsec
  88.  
  89. systemctl status crowdsec
  90.  
  91. #### Install the firewall bouncer for Crowdsec:
  92. sudo apt install crowdsec-firewall-bouncer-iptables
  93.  
  94. systemctl status crowdsec-firewall-bouncer
  95.  
  96. systemctl start crowdsec-firewall-bouncer
  97.  
  98.  
  99. #### Install the Mate desktop
  100. sudo apt install mate-desktop-environment
  101.  
  102. #### Enable required DBUS support
  103. nano ~/.profile
  104.  
  105. Add:
  106. export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
  107.  
  108. #### Install X2go server
  109. sudo add-apt-repository ppa:x2go/stable
  110.  
  111. sudo apt-get install x2goserver x2goserver-xsession
  112.  
  113.  
  114. # Install the client on your OS:
  115. https://wiki.x2go.org/doku.php/download:start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement