> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/termux/untitled.md).

# 啟動 SSH Server‌

## **啟動 SSH Server**

**雖然有以上方法叫出常用的按鍵能，但要方便使用，還是使用PC遠端登入管理最好用，所以，啟用一個ssh server的功能是相當重要的**

**apt可以改用pkg指令**

**$ apt update**\
**$ apt install openssh**

**$ ssh-keygen**

**ssh-keygen**&#x20;

**Generating public/private rsa key pair.**

**Enter file in which to save the key (/data/data/com.termux/files/home/.ssh/id\_rsa):**

**………..**

**cd .ssh**

**$ touch authorized\_keys**\
**$ cat id\_rsa.pub >> authorized\_keys**\
**$ chmod 600 authorized\_keys**\
**$ chmod 700 \~/.ssh**<br>

**啟動 SSH server(預設使用 8022 port)**

**sshd**

**# 偵錯模式**\
**$ sshd -d**\
\
**#停止 sshd**\
**$ pkill sshd** \ <br>

### **把產生的 id\_rsa 複製到遠端PC**

**cd .ssh**

**scp id\_rsa user\@yourPC:/home/user/**<br>

### **使用遠端PC登入termux**

**ssh 手機IP -i id\_rsa -p 8022**<br>

![](/files/-LklLE_qgBKPjPuNvMvu)


---

# 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://kawsing.gitbook.io/opensystem/andoid-shou-ji/termux/untitled.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.
