> For the complete documentation index, see [llms.txt](https://andronix-app.gitbook.io/andronix-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andronix-app.gitbook.io/andronix-app/vnc/ssh-basics.md).

# SSH Basics 👩‍💻

![](/files/-M4UdDNoEvDlDUK3Zope)

It is recommended that SSH Server should be used from Termux instead of using it inside the Linux. Using SSH Server from Termux gives you control of both your device and your Linux OS. We are providing you both the methods below:

## SSH from Termux:

You can follow [this](https://glow.li/technology/2015/11/06/run-an-ssh-server-on-your-android-with-termux/) link to get to know the process of using SSH from Termux. This tutorial is provided officially by one of the Termux developers.

## SSH from Linux:

Since Linux is executed by using PRoot, it cannot override the default configurations of the Android connectivity so the port number needs to be changed. Follow the below steps to use SSH from Termux:

Install **openSSH** inside Linux. Choose the command for your distro accordingly from the given list:

### Ubuntu 19

```
apt install openssh-server nano -y
```

### Ubuntu 18

```
apt install openssh-server nano -y
```

### Kali Security OS

```
apt install openssh-server nano -y
```

### Debian

```
apt install openssh-server nano -y
```

### Manjaro

```
pacman -S openssh nano --noconfim
```

### Arch

```
pacman -S openssh nano --noconfim
```

### Fedora

```
dnf install -y openssh-server nano
```

### Alpine

```
apk add openssh-server nano
```

### Void

```
xbps-install openssh nano
```

* Once OpenSSH server is installed in your Linux system, we need to modify some things to make it accessible in network escaping Android limitations. Now do:

```
nano /etc/ssh/sshd_config 
```

* Find and change the line `#Port 22` to `Port 2222`&#x20;
* Find the line `#PermitRootLogin prohibit-password`  or `#PermitRootLogin yes`  and change it to `PermitRootLogin yes` . If it is already `PermitRootLogin yes` then you do not need to change anything.
* Now when you are done with all the above steps press **CTRL+X** and then type **Y** and then press **Enter**
* Now do `ssh-keygen -A` and then `ssh-keygen`&#x20;
* Now we need to set password first. To set password type `passwd` and set any password. &#x20;
* Once this process is complete just run `/usr/sbin/sshd` to start the SSH server.
* Now just type `ip a`  and copy the IP Address of `wlan` and to connect to SSH Server.&#x20;
* To connect to SSH server type `ssh root@localhost -p 2222` and use the password to connect to the server. &#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://andronix-app.gitbook.io/andronix-app/vnc/ssh-basics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
