import { Form } from "react-router"; import Button from "~/components/button"; import Card from "~/components/card"; import Code from "~/components/code"; import Input from "~/components/input"; import Link from "~/components/link"; interface UserPromptProps { hostname: string; } export default function UserPrompt({ hostname }: UserPromptProps) { return (
Enter Username Enter the username you want to use to connect to {hostname} {". "} SSH via the web follows the same ACL rules as regular SSH access in Headscale, so only permitted usernames will work.

See the{" "} troubleshooting guide {" "} for common errors.
{ const formData = new FormData(e.currentTarget); const username = formData.get("user"); if (!username) { e.preventDefault(); return; } // We have to do a full navigation, since the page needs a full // reload to initialize the SSH connection due to us disabling the // revalidator. const url = new URL(window.location.href); url.searchParams.set("user", username.toString()); window.location.assign(url.toString()); }} >
); }