- Connect directly to this peer via SSH or RDP.
+
+ Connect directly to this peer via{" "}
+ {isSSHSupported ? "SSH or RDP" : "RDP"}.
+
diff --git a/src/app/(remote-access)/peer/ssh/page.tsx b/src/app/(remote-access)/peer/ssh/page.tsx
index ef8c7eb3c..58d3b105f 100644
--- a/src/app/(remote-access)/peer/ssh/page.tsx
+++ b/src/app/(remote-access)/peer/ssh/page.tsx
@@ -13,7 +13,7 @@ import {
useNetBirdClient,
} from "@/modules/remote-access/useNetBirdClient";
import {
- isNativeSSHSupported,
+ usesStandardSSHPort,
isNetbirdSSHProtocolSupported,
} from "@utils/version";
@@ -95,7 +95,7 @@ function SSHTerminal({ username, port, peer, ipVersion }: Props) {
if (isSSHConnected || isSSHConnecting) return;
connected.current = false;
try {
- const aclPort = isNativeSSHSupported(peer.version) ? "22022" : port;
+ const aclPort = usesStandardSSHPort(peer.version) ? "22022" : port;
const protocol = isNetbirdSSHProtocolSupported(peer.version)
? "netbird-ssh"
: "tcp";
@@ -122,7 +122,7 @@ function SSHTerminal({ username, port, peer, ipVersion }: Props) {
connected.current = true;
try {
- const aclPort = isNativeSSHSupported(peer.version) ? "22022" : port;
+ const aclPort = usesStandardSSHPort(peer.version) ? "22022" : port;
const protocol = isNetbirdSSHProtocolSupported(peer.version)
? "netbird-ssh"
: "tcp";
diff --git a/src/assets/ssh/ssh-client.png b/src/assets/ssh/ssh-client.png
deleted file mode 100644
index 2d4bf1a2f..000000000
Binary files a/src/assets/ssh/ssh-client.png and /dev/null differ
diff --git a/src/modules/peer/PeerSSHInstructions.tsx b/src/modules/peer/PeerSSHInstructions.tsx
index 1bc053a94..5442ca36b 100644
--- a/src/modules/peer/PeerSSHInstructions.tsx
+++ b/src/modules/peer/PeerSSHInstructions.tsx
@@ -11,19 +11,19 @@ import ModalHeader from "@components/modal/ModalHeader";
import Paragraph from "@components/Paragraph";
import Separator from "@components/Separator";
import Steps from "@components/Steps";
-import { Lightbox } from "@components/ui/Lightbox";
import { Mark } from "@components/ui/Mark";
import { cn } from "@utils/helpers";
import { ExternalLinkIcon, PlusCircle, TerminalSquare } from "lucide-react";
import * as React from "react";
import { useState } from "react";
-import sshImage from "@/assets/ssh/ssh-client.png";
import { SegmentedTabs } from "@components/SegmentedTabs";
+import AndroidIcon from "@/assets/icons/AndroidIcon";
import NetBirdIcon from "@/assets/icons/NetBirdIcon";
-import { Peer } from "@/interfaces/Peer";
-import { PeerSSHPolicyModal } from "@/modules/peer/PeerSSHPolicyModal";
import { getOperatingSystem } from "@hooks/useOperatingSystem";
+import { isNetbirdSSHProtocolSupported } from "@utils/version";
import { OperatingSystem } from "@/interfaces/OperatingSystem";
+import { Peer } from "@/interfaces/Peer";
+import { PeerSSHPolicyModal } from "@/modules/peer/PeerSSHPolicyModal";
type Props = {
open?: boolean;
@@ -39,6 +39,11 @@ export const PeerSSHInstructions = ({
peer,
}: Props) => {
const [client, setClient] = useState("cli");
+ // Peers already on v0.61.0+ don't need to be told which release started
+ // requiring a policy.
+ const peerRequiresSSHPolicy = isNetbirdSSHProtocolSupported(
+ peer?.version ?? "",
+ );
const [policyModal, setPolicyModal] = useState(false);
// Enabling the SSH server and root login require root, or an administrator on
@@ -75,46 +80,60 @@ export const PeerSSHInstructions = ({
Desktop Client
+
+
+ Android
+
- {client === "cli" ? (
-
+
+ {client === "cli" && (
+ <>
+
+ If you are using NetBird via CLI, you can enable SSH by
+ running{" "}
+ {isWindows
+ ? "these commands in an elevated prompt"
+ : "these commands as root"}
+ . Run the first one only if NetBird is already running. On a
+ machine where you do not have those rights, an administrator
+ has to run them.
+
- If you are using NetBird via CLI, you can enable SSH by
- running{" "}
- {isWindows
- ? "these commands in an elevated prompt"
- : "these commands as root"}
- . Run the first one only if NetBird is already running. On a
- machine where you do not have those rights, an administrator
- has to run them.
+ If you are using NetBird via the Desktop Client, click on the
+ NetBird tray icon, open Settings and turn on{" "}
+ Enable SSH Server on the SSH tab. To
+ log in as {isWindows ? "an administrator" : "root"}, enable{" "}
+ Allow Root Login on the same tab.
- If you are using NetBird via the Desktop Client, click on the
- NetBird tray icon, go to Settings and click{" "}
- Allow SSH. If you want to enable Root Login go to{" "}
- Settings > Advanced Settings and enable SSH
- Root Login under the SSH tab.
+ If you are using NetBird on Android, open the app, tap{" "}
+ Settings, then Advanced and turn on{" "}
+ Enable SSH Server.
-
-
- )}
+ )}
+
- Starting from NetBird v0.61.0, SSH requires an explicit access
- control policy to allow SSH connections to this machine.
+ {peerRequiresSSHPolicy
+ ? "SSH requires an explicit access control policy to allow SSH connections to this machine."
+ : "Starting from NetBird v0.61.0, SSH requires an explicit access control policy to allow SSH connections to this machine."}