SHELL=/bin/bash script -q /dev/null
Ctrl-Z
stty raw -echo
fg
reset
xterm
This is where im stuck at. i got the shell up and running. www-data. But im not quite sure what to do from here as im not getting a clear response. Would appreciate some help.
Comments
you need to push the button ctrl z not copy paste the whole code.
then type stty raw -echo
after that enter: fg and you will be brought back into server, then you type reset and then it will ask for the terminal type and then you enter xterm
thanks i got beyond that point. now im stuck at echo '/bin/sh' > cat
getting permission denied
i got that problem too, somebody created a post where i replied with a link to the solution which fixed it for me
i got that problem too
Run the echo command in a directory where you have permission to create files and that will fix it. Also make sure it is in the same directory where you ran the export command
It's asking you for a terminal type. Type
xterm
and you should have it.From my understanding:
Ctrl + Z
Should send your open remote session to background. Equivalent of minimizing in command linestty raw -echo
will upgrade the terminal window that you're running to have stuff like pressing the up arrow to access historyfg
Unminimizes the remote shell but it now has extended functionality because of the previous commandreset
resets the terminalxterm
after reset the terminal will prompt you with "Terminal type?" and that's where you type "xterm"As for the second issue, it's like ebok said - you don't have permissions to do anything there. When I did this box it wouldn't let me do anything from
/var/www/html/cdn-cgi/login
so Icd
'd to/home/robert
and tried the commands from there, which has worked for me.hello friends,
as per the script below
SHELL=/bin/bash script -q /dev/null
Ctrl-Z
stty raw -echo
fg
reset
xterm
when i prses Ctrl-Z it just kills the remote shell connect with nc command..
help what am i doing wrong here..
i got help from someone and they explained "Ctrl-Z" is only to put the remote shell in the background and then "fg" to bring it back
Type your comment> @deeptestpilot said:
Just wanted to share something I found on reddit this for anyone wanting to get a better understanding of what a command does. It's not perfect but it helps.
https://explainshell.com/
This is the output I get when I go through the commands... It doesn't take my back into the shell, and also doesn't let me hit enter.
Also my terminal Is basically unusable now, because I cant Ctrl-Z, Ctrl-C, Ctrl-D or even Ctrl-W. I just end up having to manually exit.
NVM I GOT IT WORKING, but each time I type a command I have to click enter then Ctrl-D
But now I don't know the password, also it's weird that xterm isn't installed.
OK so this seems to work. Im gonna keep seeing where it takes me/
From what I understand, the whole point of going through these set of commands is so that you can interact with the remote shell as you would local (history completion, up arrow history, etc.) but I'm not getting that at all. I'm finding as a couple comments up had mentioned, that I have to continue using CTRL-D to EOF any of the special characters. Is there something I am missing?