diff --git a/public/docs-static/img/ssh/ssh-client.png b/public/docs-static/img/ssh/ssh-client.png new file mode 100644 index 00000000..2d4bf1a2 Binary files /dev/null and b/public/docs-static/img/ssh/ssh-client.png differ diff --git a/public/docs-static/img/ssh/ssh-dashboard.png b/public/docs-static/img/ssh/ssh-dashboard.png new file mode 100644 index 00000000..e741ead8 Binary files /dev/null and b/public/docs-static/img/ssh/ssh-dashboard.png differ diff --git a/src/components/NavigationDocs.jsx b/src/components/NavigationDocs.jsx index 9a53c85c..10c3cebb 100644 --- a/src/components/NavigationDocs.jsx +++ b/src/components/NavigationDocs.jsx @@ -58,6 +58,7 @@ export const docsNavigation = [ { title: 'Approve Peers', href: '/how-to/approve-peers' }, { title: 'Setup Keys', href: '/how-to/register-machines-using-setup-keys' }, { title: 'Browser Client', href: '/how-to/browser-client' }, + { title: 'SSH', href: '/how-to/ssh' }, { title: 'Lazy Connections', href: '/how-to/lazy-connection'}, { title: 'Access Infrastructure', diff --git a/src/pages/how-to/browser-client.mdx b/src/pages/how-to/browser-client.mdx index 54c616a9..c7451d5e 100644 --- a/src/pages/how-to/browser-client.mdx +++ b/src/pages/how-to/browser-client.mdx @@ -21,7 +21,7 @@ Before using the Browser Client, ensure: 1. **Admin privileges** - You must be logged into the NetBird dashboard with an admin account (required for temporary ACL creation) 2. **Protocol requirements**: - - **For SSH**: The NetBird SSH server must be enabled on the target peer + - **For SSH**: The NetBird SSH server must be enabled on the target peer. Learn more about [enabling SSH access](/how-to/ssh). - **For RDP**: The RDP server must be enabled on the target machine 3. **Modern browser** - You're using an up-to-date version of Chrome, Firefox, Edge, or Safari with WebAssembly support @@ -46,6 +46,10 @@ When connecting via SSH: 1. Click the **SSH** button for your target peer 2. A credentials modal will appear + + Before connecting via SSH, make sure that SSH Access is enabled both on the target peer and in the NetBird Dashboard. Learn more about [enabling SSH access](/how-to/ssh). + +

ssh-credentials-modal

@@ -58,10 +62,6 @@ When connecting via SSH: ssh-terminal-connected

- - **NetBird SSH Required**: The target peer must have NetBird's SSH server enabled. Learn how to [enable SSH access](/how-to/cli#ssh). - - ### RDP Connection For RDP access: diff --git a/src/pages/how-to/cli.mdx b/src/pages/how-to/cli.mdx index 64266907..ec3ce4d3 100644 --- a/src/pages/how-to/cli.mdx +++ b/src/pages/how-to/cli.mdx @@ -394,7 +394,9 @@ Peers count: 2/3 Connected ### ssh Command to connect using ssh to a remote peer in your NetBird network. - + + Before using this command, make sure that SSH Access is enabled both on the target peer and in the NetBird Dashboard. Learn more about [enabling SSH access](/how-to/ssh). + You should run the ssh command with elevated permissions. #### Flags ```shell @@ -419,11 +421,14 @@ When you try to connect via `netbird ssh `, errors can occur. Please enabl ```shell netbird up --allow-server-ssh ``` -This will allow the the `SSH Access feature` to work when enabled in the dashboard, under Peers > _your_peer_ > SSH Access. + +Ensure that the peer you are trying to connect to has `SSH Access` enabled in the dashboard, under Peers > _your_peer_ > SSH Access. +

- high-level-dia + netbird ssh dashboard

+ ### version Outputs the `netbird` command version. #### Usage diff --git a/src/pages/how-to/ssh.mdx b/src/pages/how-to/ssh.mdx new file mode 100644 index 00000000..849d851f --- /dev/null +++ b/src/pages/how-to/ssh.mdx @@ -0,0 +1,69 @@ +import {Note} from "@/components/mdx"; + +# SSH + +NetBird provides secure SSH access to your peers through its built-in SSH server, allowing you to connect to remote machines without exposing SSH ports to the internet. + + + SSH Access is disabled by default and must be enabled both on the target peer and in the NetBird Dashboard. + + + +## Requirements + +To use SSH access through NetBird, you need to enable SSH in two places: + +1. **NetBird Client Settings** - Enable SSH on the target peer +2. **NetBird Dashboard** - Allow SSH access for the peer + +## Enabling SSH + +### Step 1: Enable SSH Server on Target Peer + +On the machine you want to access via SSH: + +1. Click on the NetBird tray icon +2. Navigate to Settings +3. Click on **Allow SSH** to enable the SSH server + +If you are using the CLI, you can enable SSH by running: + +```bash +netbird down # if NetBird is already running +netbird up --allow-server-ssh +``` + +

+ netbird ssh client +

+ +### Step 2: Enable SSH in Dashboard + +1. Log in to your NetBird Dashboard +2. Navigate to the target peer details page +3. Enable SSH access for the peer +4. Save the changes + +

+ netbird ssh dashboard +

+ +## Using SSH + +### CLI + +For SSH access through the command line interface (CLI), refer to the [CLI documentation](/how-to/cli#ssh) for detailed instructions on establishing SSH connections using the NetBird CLI. + +### Browser Client + +For SSH access through the Browser Client, refer to the [Browser Client documentation](/how-to/browser-client#ssh-connection) for detailed instructions on establishing SSH connections directly from your web browser. + +## Get started +

+ +

+ +- Make sure to [star us on GitHub](https://github.com/netbirdio/netbird) +- Follow us [on X](https://x.com/netbird) +- Join our [Slack Channel](/slack-url) +- NetBird [latest release](https://github.com/netbirdio/netbird/releases) on GitHub