Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move server setup instruction to the top #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

Some script to share abduco sessions with socat and SSH.

## Server setup

Lecture viewing and pair programming require the same setup, with a different script. Do this twice (with a different user) if you want both.

Choose a username, e.g. pairing. Append to `/etc/ssh/sshd_config` the lines below:

```
PrintLastLog no
Match User pairing
AllowTcpForwarding no
X11Forwarding no
PermitTunnel no
GatewayPorts no
AllowAgentForwarding no
PasswordAuthentication yes
PermitEmptyPasswords yes
```

Also comment the `AcceptEnv` line to avoid locale warnings and add `pairing` to the `AllowUsers` list.

If using pam, modify `/etc/pam.d/common-auth` to change `nullok_secure` to `nullok` to permit empty passwords with pam (as per https://superuser.com/questions/1152645/openssh-server-anonymous-account). Modify `/etc/pam.d/sshd` to comment out the two motd lines.

Create the user with the `server/viewing` (for lecture viewing) or `server/pairing` (for pair programming) script as shell and an empty password:

```sh
sudo useradd -m -s /home/pairing/shell pairing
sudo su -s /bin/sh pairing
cp <the script> shell
chmod 500 shell
exit
sudo passwd -d pairing
```

Fork this repository and change the `SERVER` constant in the scripts (or instruct your student to change it).

## Client setup

Clone or download this repository.
Expand Down Expand Up @@ -51,38 +86,3 @@ $ ./guest e989a26d-17dd-4d8e-bad3-43074f813148
Run `./share <lecture>`, replacing `<lecture>` with a nice name for your lecture (alphanumeric and - allowed).

Share the name of your lecture with your students so they can get a view of your terminal emulator. Exit the shell to stop sharing.

## Server setup

Lecture viewing and pair programming require the same setup, with a different script. Do this twice (with a different user) if you want both.

Choose a username, e.g. pairing. Append to `/etc/ssh/sshd_config` the lines below:

```
PrintLastLog no
Match User pairing
AllowTcpForwarding no
X11Forwarding no
PermitTunnel no
GatewayPorts no
AllowAgentForwarding no
PasswordAuthentication yes
PermitEmptyPasswords yes
```

Also comment the `AcceptEnv` line to avoid locale warnings and add `pairing` to the `AllowUsers` list.

If using pam, modify `/etc/pam.d/common-auth` to change `nullok_secure` to `nullok` to permit empty passwords with pam (as per https://superuser.com/questions/1152645/openssh-server-anonymous-account). Modify `/etc/pam.d/sshd` to comment out the two motd lines.

Create the user with the `server/viewing` (for lecture viewing) or `server/pairing` (for pair programming) script as shell and an empty password:

```sh
sudo useradd -m -s /home/pairing/shell pairing
sudo su -s /bin/sh pairing
cp <the script> shell
chmod 500 shell
exit
sudo passwd -d pairing
```

Fork this repository and change the `SERVER` constant in the scripts (or instruct your student to change it).