feat(issue-11): add SSH setup script and remote access documentation #16
@@ -36,37 +36,20 @@ incus exec <container-name> -- bash
|
|||||||
incus exec <container-name> -- apt-get update
|
incus exec <container-name> -- apt-get update
|
||||||
incus exec <container-name> -- apt-get install -y systemd
|
incus exec <container-name> -- apt-get install -y systemd
|
||||||
|
|
||||||
# Enable systemd as PID 1 (if using systemd in container)
|
# Enable systemd in container (Incus specific - verify with your setup)
|
||||||
incus config set <container-name> init.launchd.systemd true
|
incus config set <container-name> security.syscalls.intercept.systemd true
|
||||||
```
|
|
||||||
|
|
||||||
### Docker/Podman
|
> **Note:** Container must be privileged or have CAP_SYS_ADMIN for systemd features.
|
||||||
|
> The exact command may vary by Incus version - check Incus documentation for your setup.
|
||||||
```bash
|
|
||||||
# Use an image with systemd support
|
|
||||||
docker run -d --name <container-name> \
|
|
||||||
--systemd=always \
|
|
||||||
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
|
|
||||||
debian:12 \
|
|
||||||
/sbin/init
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## SSH Setup
|
## SSH Setup
|
||||||
|
|
||||||
### Quick Setup (Automated)
|
### Automated Setup
|
||||||
|
|
||||||
Run the setup script inside your container:
|
Run the setup script inside your container:
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -fsSL https://raw.githubusercontent.com/shoko/kugetsu/main/skills/kugetsu/scripts/sshd-setup.sh -o sshd-setup.sh
|
|
||||||
chmod +x sshd-setup.sh
|
|
||||||
bash sshd-setup.sh <username>
|
|
||||||
```
|
|
||||||
|
|
||||||
Or if you have cloned the repository:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chmod +x skills/kugetsu/scripts/sshd-setup.sh
|
chmod +x skills/kugetsu/scripts/sshd-setup.sh
|
||||||
bash skills/kugetsu/scripts/sshd-setup.sh <username>
|
bash skills/kugetsu/scripts/sshd-setup.sh <username>
|
||||||
@@ -165,17 +148,8 @@ ssh -p 2222 <username>@localhost sudo systemctl status sshd
|
|||||||
### Automated Install
|
### Automated Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://raw.githubusercontent.com/shoko/kugetsu/main/skills/kugetsu/scripts/kugetsu-install.sh | bash
|
# If you have cloned the repository
|
||||||
```
|
bash skills/kugetsu/scripts/kugetsu-install.sh
|
||||||
|
|
||||||
### Manual Install
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Clone repository
|
|
||||||
git clone https://git.fbrns.co/shoko/kugetsu.git
|
|
||||||
|
|
||||||
# Run install script
|
|
||||||
bash kugetsu/skills/kugetsu/scripts/kugetsu-install.sh
|
|
||||||
|
|
||||||
# Reload shell or source bashrc
|
# Reload shell or source bashrc
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
@@ -323,8 +297,8 @@ ssh -p 2222 <username>@<host-ip> ls -la ~/.ssh/
|
|||||||
# Check PATH
|
# Check PATH
|
||||||
ssh -p 2222 <username>@<host-ip> 'echo $PATH'
|
ssh -p 2222 <username>@<host-ip> 'echo $PATH'
|
||||||
|
|
||||||
# Re-run install
|
# Re-run install (if repo is cloned on container)
|
||||||
ssh -p 2222 <username>@<host-ip> 'bash ~/.kugetsu/scripts/kugetsu-install.sh'
|
ssh -p 2222 <username>@<host-ip> 'bash ~/path/to/kugetsu/skills/kugetsu/scripts/kugetsu-install.sh'
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user