DOCUMENTATION: Clarify scp and exec darknet permissions in API docs (#2634)

This commit is contained in:
Lee Stutzman
2026-04-10 01:24:37 +01:00
committed by GitHub
parent 19b137e2fb
commit d6299becd6
3 changed files with 12 additions and 2 deletions

View File

@@ -132,4 +132,5 @@ ns.exec("generic-hack.js", "joesguns", {threads: 10});
// arguments to the script.
ns.exec("foo.js", "foodnstuff", 5, 1, "test");
```
For darknet servers: A session must be established with the target server, and the script must be running on a server that is directly connected to the target, or the target must have a backdoor or stasis link installed.

View File

@@ -112,5 +112,5 @@ const server = ns.args[0];
const files = ["hack.js", "weaken.js", "grow.js"];
ns.scp(files, server, "home");
```
For password-protected servers (such as darknet servers), a session must be established with the destination server before using this function. (The source server does not require a session.)
For darknet servers: The destination requires a session, but unlike [exec](./bitburner.ns.exec.md)<!-- -->, does not require a direct connection — scp works at any distance. The source server has no darknet requirements (no session or connection needed). Use [dnet.authenticate](./bitburner.darknet.authenticate.md) (requires direct connection) or [dnet.connectToSession](./bitburner.darknet.connecttosession.md) (at any distance) to establish a session.