Remote Connections to Ubuntu Desktops
Remote Connections to Ubuntu Desktops via SSH and Microsoft Remote Desktop
Connecting via SSH
Step 1 : Ensure ssh is enabled on the Ubuntu host (system being connected to) by running the following commands in the terminal on the Ubuntu host:
- 'sudo apt install openssh-server'to install openssh server
- 'sudo systemctl enable ssh'to enable ssh
- 'sudo ufw allow ssh'to allow ssh traffic through firewall
- 'sudo systemctl status ssh'to check ssh status

Step 2: Connect to the Ubuntu host by running the following command in the terminal on the client (system being connected from):
- ssh username@ip_address or hostname| For example:- ssh ojieok@10.229.2.34
- To find the ip address you can enter 'ifconfig' or 'ip a'in terminal


Connecting via the Remote Desktop Application
Step 1: To install xrdp and allow remote connections to the Ubuntu host (system being connected to), run the following commands in terminal (Ctrl+Alt+T) :
- sudo apt install xrdp -yto install xrdp
- sudo systemctl start xrdpto start xrdp
- sudo systemctl enable xrdpto enable xrdp
- sudo systemctl status xrdpto check the status of xrdp, if it is active
- sudo ufw allow from any to any port 3389 proto tcp
Step 2: Ensure that Remote Desktop is not enabled in settings. If it is enabled, this might not work

- Accessing Ubuntu from Windows:
- Open the Remote Desktop Connection app and enter the domain name or IP address of the Ubuntu host
- To find the IP address enter  ifconfigorip ain terminal
- In the next tab, click Yes
- Provide the username and password to sign in to the Ubuntu host
 



- Accessing Ubuntu from macOS:
- Launch the Windows App for Mac (previously Microsoft Remote Desktop): https://apps.apple.com/us/app/windows-app/id1295203466?mt=12
- Add the Ubuntu system via its host name or IP address
- Select the connection and enter the Ubuntu systems credentials when prompted
 




Disabling SSH
- To disable SSH on the Ubuntu system, run the following commands in terminal:
 sudo systemctl disable --now ssh
