diff --git a/markdown/bitburner.ns.exec.md b/markdown/bitburner.ns.exec.md index d8ea182df..18afa74b5 100644 --- a/markdown/bitburner.ns.exec.md +++ b/markdown/bitburner.ns.exec.md @@ -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. diff --git a/markdown/bitburner.ns.scp.md b/markdown/bitburner.ns.scp.md index 5f7f5e622..d10a81afe 100644 --- a/markdown/bitburner.ns.scp.md +++ b/markdown/bitburner.ns.scp.md @@ -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. diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 3101312d3..501f089c7 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -7920,6 +7920,11 @@ export interface NS { * // 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. + * * @param script - Filename of script to execute. This file must already exist on the target server. * @param host - Hostname/IP of the target server on which to execute the script. * @param threadOrOptions - Either an integer number of threads for new script, or a {@link RunOptions} object. Threads defaults to 1. @@ -8057,7 +8062,11 @@ export interface NS { * 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 {@link NS.exec | exec}, does not + * require a direct connection — scp works at any distance. The source server has no darknet requirements + * (no session or connection needed). Use {@link Darknet.authenticate | dnet.authenticate} (requires direct + * connection) or {@link Darknet.connectToSession | dnet.connectToSession} (at any distance) to + * establish a session. * * @param files - Filename or an array of filenames of script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`. * @param destination - Hostname/IP of the destination server, which is the server to which the file will be copied.