Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

NXSH Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=NXSH |image=nxshswitch.png |description=A remote shell for the Nintendo Switch over telnet. |author=Cesura |lastupdated=2019/02/03 |type=Utilities |version=0.1.8-beta |license=BSD-3-Clause |download=https://dlhb.gamebrew.org/switchhomebrews/nxshswitch.7z |website=https://gbatemp.net/threads/nxsh-remote-shell-for-the-nintendo-switch-over-telnet.522317/ |source=https://github.com/Cesura/nxsh |donation= }} {{#seo: |title=Switch Homebrew App...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Infobox Switch Homebrews
{{Infobox Switch Homebrews
|title=NXSH
|title=NXSH
|image=nxshswitch.png
|image=nxsh.png
|description=A remote shell for the Nintendo Switch over telnet.
|description=BusyBox-like remote shell for the Nintendo Switch over telnet.
|author=Cesura
|author=Cesura
|lastupdated=2019/02/03
|lastupdated=2019/02/03
Line 8: Line 8:
|version=0.1.8-beta
|version=0.1.8-beta
|license=BSD-3-Clause
|license=BSD-3-Clause
|download=https://dlhb.gamebrew.org/switchhomebrews/nxshswitch.7z
|download=https://dlhb.gamebrew.org/switchhomebrews/nxsh.7z
|website=https://gbatemp.net/threads/nxsh-remote-shell-for-the-nintendo-switch-over-telnet.522317/
|website=https://gbatemp.net/threads/nxsh-remote-shell-for-the-nintendo-switch-over-telnet.522317/
|source=https://github.com/Cesura/nxsh
|source=https://github.com/Cesura/nxsh
|donation=
|donation=
}}
}}
{{#seo:
BusyBox-like remote shell for the Nintendo Switch over telnet.
|title=Switch Homebrew Apps (Utilities) - GameBrew
 
|title_mode=append
==Installation==
|image=nxshswitch.png
For a basic installation, grab the latest nxsh.nro version from the release page. You can [https://github.com/Cesura/nxsh#building-from-source-unix build it from source] if you so choose.
|image_alt=NXSH
 
}}
To make the application available at the root of your homebrew menu, simply copy the nxsh.nro file to the /switch directory of your SD card. You can do this directly, but it is recommended using one of the many ftpd applications that are available on the [[Homebrew App Store Switch|Homebrew App Store]].
{{cleanup|article|Needs cleanup}}
 
A remote shell for the Nintendo Switch over telnet.
==User guide==
===Connecting===
Once started, the application will listen on port 23 for incoming connections. If the socket initializes correctly, the listen address will be displayed on your Switch's screen. Unfortunately, until multithreading is fully supported for Switch homebrew apps, the shell cannot accept more than 1 simultaneous connection.
 
====Linux/BSD/Mac OS====
First ensure that you have the "telnet" client installed on your local machine (it may or may not be bundled with your base distribution). For Mac users, it is recommended installing the client via the Homebrew package manager
 
$ brew install telnet
From there, connecting to nxsh is as simple as:
 
$ telnet [address]
where address is your Switch's IP.
 
====Windows====
The built-in Windows telnet client does not play nicely with nxsh, so it is recommended installing [https://www.putty.org/ PuTTY].
 
Note that connecting via a "raw" connection instead of a "telnet" one will avoid a pesky "command not found" message upon initialization of the shell. The telnet protocol sends some garbage text as it's negotiating the connection, so if you want a clean-looking shell, ditch that and go for a raw socket.
 
===Usage===
nxsh bundles its own implementations of basic coreutils, such as (but not necessarily limited to):
*cat
*ls
*rm
*cp
*mv
 
etc. etc.
 
For a full list of commands supported by your current version of nxsh, type "help" in the prompt.


==Media==
===Scripting===
<youtube></youtube>
As of version 0.1.7 beta, nxsh supports scripting via an ECMAScript-compliant engine named duktape. You can execute scripts in the following way:
$ ./script_name.js


See examples/quadratic.js for an basic example script that works with the shell. As many of the more desirable JS features are non-standard and machine-dependent (such as file I/O).


==Screenshots==
==Screenshots==
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-01.png
'''Switch view'''<br>
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-02.png
https://dlhb.gamebrew.org/switchhomebrews/nxsh.png
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-03.png
 
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-04.png
'''Remote view'''<br>
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-05.png
https://dlhb.gamebrew.org/switchhomebrews/nxsh2.png
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-06.png
 
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-07.png
==Known issues==
https://dlhb.gamebrew.org/switchhomebrews/nxshswitch-08.png
https://github.com/Cesura/nxsh/issues


==Changelog==
==Changelog==
'''v.1.0'''
'''0.1.8-beta 2019/02/03'''
* First Release.
*Implemented NAND browsing (see mount command). Big thanks to @friedkeenan for the contribution.
'''0.1.7-beta 2018/11/15'''
*Added JS scripting functionality via duktape. You can now write scripts and execute them, provided they are ECMAScript 5.1 compliant. See the examples/ *directory for a bit more information.
*Added native print(), readFile(), and writeFile() functions (see above).
'''0.1.6-alpha 2018/11/06'''
*Added password authentication system (see passwd command).
'''0.1.5-alpha 2018/11/05'''
*Implemented a fetch command with libcurl in the backend. This lets you fetch files from remote servers.
*Added a chmod command that /should/ work, but is disabled while I investigate issues with the Switch's filesystem.
'''0.1.4-alpha 2018/11/05'''
*Adding logging functionality (see "log" command).
*Updated prompt to be more traditionally unix-like (thanks for the suggestion @fennectech).
'''0.1.3-alpha 2018/11/03'''
*Sorry for so many quick releases. This one fixes a critical segfault and updates some of the usage documentation.
'''0.1.2-alpha 2018/11/02'''
*Added cp/mv functionality, and fixed a bug for PuTTY users. Note that it is recommended that you connect with the "raw" option rather than "telnet" in PuTTY.
'''0.1-alpha 2018/11/02'''
*First relesae.


== External links ==
== External links ==
* Gbatemp - https://gbatemp.net/threads/nxsh-remote-shell-for-the-nintendo-switch-over-telnet.522317/
* GitHub - https://github.com/Cesura/nxsh
* Github - https://github.com/Cesura/nxsh
* GBAtemp - https://gbatemp.net/threads/nxsh-remote-shell-for-the-nintendo-switch-over-telnet.522317/
* Reddit -

Latest revision as of 05:23, 28 April 2023

NXSH
Nxsh.png
General
AuthorCesura
TypeUtilities
Version0.1.8-beta
LicenseBSD-3-Clause
Last Updated2019/02/03
Links
Download
Website
Source

BusyBox-like remote shell for the Nintendo Switch over telnet.

Installation

For a basic installation, grab the latest nxsh.nro version from the release page. You can build it from source if you so choose.

To make the application available at the root of your homebrew menu, simply copy the nxsh.nro file to the /switch directory of your SD card. You can do this directly, but it is recommended using one of the many ftpd applications that are available on the Homebrew App Store.

User guide

Connecting

Once started, the application will listen on port 23 for incoming connections. If the socket initializes correctly, the listen address will be displayed on your Switch's screen. Unfortunately, until multithreading is fully supported for Switch homebrew apps, the shell cannot accept more than 1 simultaneous connection.

Linux/BSD/Mac OS

First ensure that you have the "telnet" client installed on your local machine (it may or may not be bundled with your base distribution). For Mac users, it is recommended installing the client via the Homebrew package manager

$ brew install telnet

From there, connecting to nxsh is as simple as:

$ telnet [address]

where address is your Switch's IP.

Windows

The built-in Windows telnet client does not play nicely with nxsh, so it is recommended installing PuTTY.

Note that connecting via a "raw" connection instead of a "telnet" one will avoid a pesky "command not found" message upon initialization of the shell. The telnet protocol sends some garbage text as it's negotiating the connection, so if you want a clean-looking shell, ditch that and go for a raw socket.

Usage

nxsh bundles its own implementations of basic coreutils, such as (but not necessarily limited to):

  • cat
  • ls
  • rm
  • cp
  • mv

etc. etc.

For a full list of commands supported by your current version of nxsh, type "help" in the prompt.

Scripting

As of version 0.1.7 beta, nxsh supports scripting via an ECMAScript-compliant engine named duktape. You can execute scripts in the following way:

$ ./script_name.js

See examples/quadratic.js for an basic example script that works with the shell. As many of the more desirable JS features are non-standard and machine-dependent (such as file I/O).

Screenshots

Switch view
nxsh.png

Remote view
nxsh2.png

Known issues

https://github.com/Cesura/nxsh/issues

Changelog

0.1.8-beta 2019/02/03

  • Implemented NAND browsing (see mount command). Big thanks to @friedkeenan for the contribution.

0.1.7-beta 2018/11/15

  • Added JS scripting functionality via duktape. You can now write scripts and execute them, provided they are ECMAScript 5.1 compliant. See the examples/ *directory for a bit more information.
  • Added native print(), readFile(), and writeFile() functions (see above).

0.1.6-alpha 2018/11/06

  • Added password authentication system (see passwd command).

0.1.5-alpha 2018/11/05

  • Implemented a fetch command with libcurl in the backend. This lets you fetch files from remote servers.
  • Added a chmod command that /should/ work, but is disabled while I investigate issues with the Switch's filesystem.

0.1.4-alpha 2018/11/05

  • Adding logging functionality (see "log" command).
  • Updated prompt to be more traditionally unix-like (thanks for the suggestion @fennectech).

0.1.3-alpha 2018/11/03

  • Sorry for so many quick releases. This one fixes a critical segfault and updates some of the usage documentation.

0.1.2-alpha 2018/11/02

  • Added cp/mv functionality, and fixed a bug for PuTTY users. Note that it is recommended that you connect with the "raw" option rather than "telnet" in PuTTY.

0.1-alpha 2018/11/02

  • First relesae.

External links

Advertising: