lshell | shell coded in Python , that lets you restrict a user | Command Line Interface library
kandi X-RAY | lshell Summary
kandi X-RAY | lshell Summary
lshell - limited shell
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Check if ssh is configured
- Help command
- Autocomplete names
- Log a warning
- Print help message
- The mainloop loop
- Parse one command line
- Print the default message to stdout
- Return the empty line
- Read configuration files
- Get a section of the config
- Substitute a value from a configuration dictionary
- Expand all shell directories
- Get user configuration
- Evaluate a value
- Set the path_noexec
lshell Key Features
lshell Examples and Code Snippets
Community Discussions
Trending Discussions on lshell
QUESTION
I am trying to create a PowerShell script to SSH into a Raspberry Pi and perform some commands. I am using Plink to SSH into the Pi over command line. However I have to SSH into the Pi user which runs in lshell. I can PuTTY into the Pi with zero issues, but when using Plink I get an error saying the command I am using is forbidden. I am trying to use su
which works when using PuTTY by not Plink.
The error I get is below:
...ANSWER
Answered 2017-Oct-05 at 18:37There are two differences when using plink ... command
comparing to logging in with PuTTY and typing command
:
plink ... command
opens an "exec" channel to run the command. While PuTTY opens "shell" channel with login shell and only the shell runs the command.plink ... command
by default opens a non-interactive session (no TTY). While PuTTY opens an interactive session (with TTY).
To test the Plink behavior in PuTTY:
- Enter the command to Connection > SSH > Remote command.
- Check Connection > SSH > TTY > Don't allocate a pseudo-terminal.
Conversely, to test PuTTY behavior in Plink, use:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lshell
You can use lshell like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page