From 6219d2ca53d817e8ad00fbe27cb3c186c7d3db8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Va=C5=A1ek?= <433748@mail.muni.cz>
Date: Mon, 3 Apr 2023 11:43:25 +0200
Subject: [PATCH] update accessing-instances page

---
 .../docs/additional-information/faq.md        | 11 +++
 .../docs/how-to-guides/accessing-instances.md | 96 ++++++++++++-------
 2 files changed, 74 insertions(+), 33 deletions(-)

diff --git a/topics/compute/openstack/docs/additional-information/faq.md b/topics/compute/openstack/docs/additional-information/faq.md
index 4046c5f7..fbd707ae 100644
--- a/topics/compute/openstack/docs/additional-information/faq.md
+++ b/topics/compute/openstack/docs/additional-information/faq.md
@@ -56,3 +56,14 @@ Also you can access site specific FAQ:
 	- Use OpenStack Snapshots for local backup.
 	- Use backup software like Borg or Restic to create an offsite incremental backup.
 	- Use backup/data storage services provided by your local it support or CESNET (e. g. on MU [https://it.muni.cz/sluzby/zalohovani-bacula](https://it.muni.cz/sluzby/zalohovani-bacula)).
+
+??? "What is the default user for my VM?"
+  Default users are usually the same as the name of the operating system you are running.
+
+  | OS     | Login for SSH command |
+  |--------|-----------------------|
+  | Debian | debian                |
+  | Ubuntu | ubuntu                |
+  | Centos | centos                |
+
+  In more general the default user is the value of the `default_user` property of the image.
diff --git a/topics/compute/openstack/docs/how-to-guides/accessing-instances.md b/topics/compute/openstack/docs/how-to-guides/accessing-instances.md
index 09677b97..2c56cc8e 100644
--- a/topics/compute/openstack/docs/how-to-guides/accessing-instances.md
+++ b/topics/compute/openstack/docs/how-to-guides/accessing-instances.md
@@ -6,51 +6,81 @@ search:
 ---
 
 # Accessing Instances
+This page provides instructions on how to access virtual instances in OpenStack. Instances are virtual machines running on a cloud infrastructure. Whether you're an administrator or end user, this page will guide you through accessing and interacting with your instances on OpenStack.
 
 ## Prerequisites
+Before you can access instances running on OpenStack, you should have met the following prerequisites:
 
-- Created [networking](../how-to-guides/create-networking.md)
-- Configured [Security groups](../getting-started/creating-first-infrastructure.md#update-security-group)
-- Imported [SSH key](../getting-started/creating-first-infrastructure.md#create-key-pair)
-- Created [Virtual machine](../getting-started/creating-first-infrastructure.md#create-virtual-machine-instance)
-- Associated [Floating IP](../how-to-guides/allocating-floating-ips.md)
+- [Created networking](../how-to-guides/create-networking.md): You should have created a network in OpenStack that your instances can connect to.
+- [Configured Security groups](../getting-started/creating-first-infrastructure.md#update-security-group): You should have configured security groups in OpenStack to allow traffic to and from your instances.
+- [Imported SSH key](../getting-started/creating-first-infrastructure.md#create-key-pair): If you plan to access instances, you should have imported an SSH key into OpenStack that you can use to authenticate with your instances.
+- [Created Virtual machine](../getting-started/creating-first-infrastructure.md#create-virtual-machine-instance): You should have created a virtual machine instance in OpenStack that you want to access.
+- [Associated Floating IP](../how-to-guides/allocating-floating-ips.md): If you plan to access instances from outside the OpenStack environment, you should have associated a floating IP with your instance.
 
-## Connecting to VM
+If you're unsure about any of these prerequisites, please refer to the relevant documentation page for more information.
 
-After the creation of the virtual machine, it is usually immediately possible to
-connect to the VM via SSH.
+## Access Methods
+There are several different methods that you can use to access instances running on OpenStack. Here's a brief overview of each method and their benefits and limitations:
 
-=== "Linux"
+- SSH: Secure Shell (SSH) is a command-line interface that allows you to remotely connect to a virtual machine instance running on OpenStack. SSH provides secure access to your instances and is a popular choice for Linux-based instances. However, SSH can be difficult to set up for novice users, and it may not be the best option for users who require a graphical interface.
+- Remote desktop: Remote desktop allows you to access your instances through a graphical interface, similar to what you might see on your local machine. OpenStack supports several remote desktop protocols, including Remote Desktop Protocol (RDP) for Windows-based instances and Virtual Network Computing (VNC) for Linux-based instances. Remote desktop is user-friendly and provides a familiar interface for users. However, remote desktop may not be as secure as SSH, and it may be slower than other access methods, especially when accessing instances over the internet.
+- VNC: Virtual Network Computing (VNC) is a graphical desktop sharing system that allows you to remotely control a desktop environment. VNC is widely used for accessing Linux-based instances on OpenStack. VNC provides a graphical interface similar to remote desktop, but it may be more flexible than remote desktop in terms of customization options. However, VNC can be complex to set up and may require additional software on your local machine.
+
+Consult the relevant documentation for each access method for more detailed instructions on how to set up and use each method.
 
-    Make sure to add your private ssh key in `$HOME/.ssh/id_rsa` or refer to
-    [Technical reference](../technical-reference/remote-access.md)
-    for additional possibilities as the first connection must be always done via SSH key.
+## Connecting to Instances
+To connect to instances running on OpenStack, you can use one of the available access methods, such as SSH, remote desktop, or VNC. Here are step-by-step instructions on how to connect to your instances using each method:
+=== "Linux"
 
-    Now you should be able to connect to the VM via SSH:
+    ### SSH
+    - Import your private SSH key corresponding to your public SSH key in the VM into folder `~/.ssh/id_rsa` for key authentication.
+    - Open a terminal window on your local machine.
+    - Use the `ssh` command and the IP address or hostname of your instance to establish a connection. For example:
 
     ``` example
-    ssh centos@147.251.255.254
+    ssh ubuntu@147.251.100.100
     ```
 
-=== "Windows"
-
-    Windows users need to use third party program [PuTTY](https://www.putty.org/).
-    Before the connection via putty is possible it is first necessary to import
-    private ssh key as is explained in [Technical reference](../technical-reference/remote-access.md).
+    For more detailed instructions on how to connect using SSH, consult the relevant documentation for your operating system.
+    ### VNC
+    - Install a VNC client on your local machine.
+    - Obtain the VNC server IP address and port number from your instance's console or dashboard.
+    - Use the VNC client to connect to the server IP address and port number.
+    - Enter your username and password when prompted.
+    - Once you are connected, you can interact with your instance using the graphical interface.
 
-## Default Users
+    For more detailed instructions on how to connect using VNC, consult the relevant documentation for your VNC client.
 
-| OS     | Login for SSH command |
-|--------|-----------------------|
-| Debian | debian                |
-| Ubuntu | ubuntu                |
-| Centos | centos                |
-
-In more general the default user is the value of the `default_user` property of the image.
-
-## Problems
-
-If you have problems connecting to the VM, verify the correct configuration of
-[Security groups](../how-to-guides/managing-security-groups.md).
+=== "Windows"
 
-If you receive an error after connecting to the VM, verify your SSH key.
+    ### PuTTY
+    - Open [PuTTY](https://www.putty.org/) and enter the IP address of your instance in the "Host Name" field.
+    - Select `SSH` as the connection type.
+    - Go to `Connection -> SSH -> Auth` and browse to the private key file.
+    - Click `Open` to start the connection.
+    - Enter your username when prompted.
+
+    For more detailed instructions on how to connect using PuTTY, consult the relevant documentation for your operating system.
+    ### Remote desktop
+    - Open the Remote Desktop Connection client on your local machine.
+    - Enter the IP address or hostname of your instance in the `Computer` field.
+    - Enter your username and password when prompted.
+    - Click `Connect` to establish a connection.
+    - Once you are connected, you can interact with your instance using the graphical interface.
+
+    For more detailed instructions on how to connect using remote desktop, consult the relevant documentation for your operating system.
+
+## Troubleshooting
+- Verify network connectivity: If you're unable to access instances, first make sure that you have network connectivity to the OpenStack environment. Check your network connection and ensure that your IP address is in the correct range. You should also ensure that any firewalls or security groups are configured to allow access to the instances.
+- Verify credentials: If you're unable to authenticate when attempting to access instances, verify that you are using the correct username and password or SSH key pair. You may also need to check that your credentials have the appropriate permissions to access the instances.
+- Check instance status: If you're unable to connect to an instance, check its status in the OpenStack dashboard. If the instance is not in an ACTIVE state, there may be an issue with its configuration or the underlying infrastructure. Try rebooting the instance or creating a new instance with similar configurations.
+- Check logs: If you're still unable to connect to an instance, check the logs for any errors or warnings. The OpenStack console log and the instance's system log can provide useful information on what might be causing the issue.
+- Check FAQ: If you approach an issue when connecting to our infrastructure, make sure to first check FAQ before contacting support.
+- Contact support: If you're unable to resolve the issue on your own, contact your OpenStack support team for further assistance. Be sure to provide as much information as possible, including error messages and steps you've already taken to troubleshoot the issue.
+
+## Security considerations
+- Use ssh keys: When accessing instances, it is important to use SSH keys. Avoid using keys that are easy to guess or brute force.
+- Restrict network access: To minimize the risk of unauthorized access, it is recommended to restrict network access to only the necessary ports and protocols needed to access the instances. Security groups can be used to control inbound and outbound traffic to instances.
+- Limit user access: Only users who need to access instances should have the necessary credentials to do so. It is important to restrict user access to only the instances they need to work on and remove access when it is no longer needed.
+- Monitor access logs: Monitoring access logs can help detect and prevent unauthorized access. OpenStack provides logs that track user access and activity within the environment, and users should review these logs on a regular basis.
+- Keep instances up-to-date: Keeping instances up-to-date with the latest security patches and updates can help prevent security vulnerabilities from being exploited. It is recommended to regularly apply updates and patches to instances to maintain their security posture.
-- 
GitLab