Jump to content
dmacias

[Plugin] Command Line Tools (Shell in a Box) for 6.1+

97 posts in this topic Last Reply

Recommended Posts

Can this be updater for Unraid 6.3.0.RC2?

 

Just updated my server and tested it out and it does not bring up the command window...

 

Any help would be appreciated.

 

Thanks!

Share this post


Link to post

Can this be updater for Unraid 6.3.0.RC2?

 

Just updated my server and tested it out and it does not bring up the command window...

 

Any help would be appreciated.

 

Thanks!

Yes I'll check it out. I'm on rc2 also but I don't use the shellinabox portion of the plugin.

Share this post


Link to post

Can this be updater for Unraid 6.3.0.RC2?

 

Just updated my server and tested it out and it does not bring up the command window...

 

Any help would be appreciated.

 

Thanks!

Yes I'll check it out. I'm on rc2 also but I don't use the shellinabox portion of the plugin.

 

Awesome!!

 

Thank you

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post

Can this be updater for Unraid 6.3.0.RC2?

 

Just updated my server and tested it out and it does not bring up the command window...

 

Any help would be appreciated.

 

Thanks!

Yes I'll check it out. I'm on rc2 also but I don't use the shellinabox portion of the plugin.

 

Awesome!!

 

Thank you

 

 

Sent from my iPhone using Tapatalk

I suspect your using Connect by IP Address. I also started using my second nic bridged for vm's and now have multiple variables for ipaddr. If I turn that on, it won't connect. I'll have to do a little work before it's fixed. Maybe just add an ip address field. But it works fine for me with Connect by IP Address set to no.

Share this post


Link to post

Can this be updater for Unraid 6.3.0.RC2?

 

Just updated my server and tested it out and it does not bring up the command window...

 

Any help would be appreciated.

 

Thanks!

Yes I'll check it out. I'm on rc2 also but I don't use the shellinabox portion of the plugin.

 

Awesome!!

 

Thank you

 

 

Sent from my iPhone using Tapatalk

I suspect your using Connect by IP Address. I also started using my second nic bridged for vm's and now have multiple variables for ipaddr. If I turn that on, it won't connect. I'll have to do a little work before it's fixed. Maybe just add an ip address field. But it works fine for me with Connect by IP Address set to no.

Works when I disable by ip... Thanks!

 

Sent from my Nexus 6P using Tapatalk

 

 

Share this post


Link to post

I often am not able to login to this. I don't know what causes it, but I will be asked for a user/pass and I get "login incorrect". I notice it often happens after having 2 connections open already to it and I try a 3rd and get this error.

 

At the moment, I have no connections open and still cannot login.

 

The log shows this when I attempt:

Dec 6 16:12:07 Storinator login[10711]: ILLEGAL ROOT LOGIN on '/dev/pts/11' from '192.168.1.6'

 

I saw this thread, so it may be that I have too many ghost connections. If this is the problem, how can I clear these ghost connections?

 

I also noticed if I have just one SSH connection, I cannot use this plugin to telnet at all.

Share this post


Link to post

I often am not able to login to this. I don't know what causes it, but I will be asked for a user/pass and I get "login incorrect". I notice it often happens after having 2 connections open already to it and I try a 3rd and get this error.

 

At the moment, I have no connections open and still cannot login.

 

The log shows this when I attempt:

Dec 6 16:12:07 Storinator login[10711]: ILLEGAL ROOT LOGIN on '/dev/pts/11' from '192.168.1.6'

 

I saw this thread, so it may be that I have too many ghost connections. If this is the problem, how can I clear these ghost connections?

 

I also noticed if I have just one SSH connection, I cannot use this plugin to telnet at all.

Only thing I can think of is, maybe you left some screen sessions running. I would try adding more pts to /etc/securetty like mentioned in that thread.

Share this post


Link to post

Ok I found the problem now. The issue is if you don't manually close the session with a quit command, it will remain open forever. This can happen if your browser crashes, or if you just click something else within the same window the session is on and leave the page.

 

 

Following that thread, the PS command doesn't show ghost connections as suggested:

root@Storinator:~# ps
  PID TTY          TIME CMD
5446 pts/18   00:00:00 bash
5619 pts/18   00:00:00 ps

 

 

So it's not really a bug with this plugin, but rather something not being handled that is caused by this plugin running in a window that so easily can be brought on.

 

 

The w (who) command does show some idle sessions:

root@Storinator:~# w
14:48:28 up 40 days, 21:22,  7 users,  load average: 0.29, 0.28, 0.29
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    tmux(28042).%0   21Nov16 39days 54:18  54:18  /usr/bin/rtorrent -n -o import=/config/rtorrent/rtorrent.rc
root     pts/1    tmux(28042).%3   23Nov16 38days  0.02s  0.02s -sh
root     pts/2    tmux(28042).%2   21Nov16 39days  0.02s  0.02s -sh
root     pts/10   tmux(28042).%4   27Nov16 34days  0.02s  0.02s -sh
root     pts/12   tmux(28042).%6   29Nov16 32days  0.02s  0.02s -sh
root     pts/5    tmux(28042).%7   29Nov16 31days  0.02s  0.02s -sh
root     pts/18   192.168.1.5      14:40    0.00s  0.00s  0.00s w

 

 

'who -aH' will list all processes taking up those precious pts/# slots:

root@Storinator:~# who -aH
NAME       LINE         TIME             IDLE          PID COMMENT  EXIT
                        2016-11-20 17:26              1166 id=si    term=0 exit=0
           system boot  2016-11-20 17:26
           run-level 3  2016-11-20 17:26                   last=S
                        2016-11-20 17:27              1590 id=rc    term=0 exit=0
LOGIN      tty1         2016-11-20 17:27              9102 id=c1
LOGIN      tty6         2016-11-20 17:27              9107 id=c6
LOGIN      tty5         2016-11-20 17:27              9106 id=c5
LOGIN      tty4         2016-11-20 17:27              9105 id=c4
LOGIN      tty2         2016-11-20 17:27              9103 id=c2
LOGIN      tty3         2016-11-20 17:27              9104 id=c3
           pts/0        2016-11-21 18:52             15024 id=/0    term=0 exit=0
           pts/1        2016-11-22 20:36               597 id=/1    term=0 exit=0
           pts/4        2016-11-30 22:36             29951 id=/4    term=0 exit=0
           pts/5        2016-11-21 19:58             30206 id=/5    term=0 exit=0
           pts/7        2016-12-15 00:02             22223 id=ts/7  term=0 exit=0
           pts/4        2016-11-21 19:27             13817 id=ts/4  term=0 exit=0
root     + pts/0        2016-11-21 19:55  old        28042 (tmux(28042).%0)
root     + pts/1        2016-11-23 00:47  old        28042 (tmux(28042).%3)
root     + pts/2        2016-11-21 19:56  old        28042 (tmux(28042).%2)
           pts/7        2016-12-21 12:36              7776 id=/7    term=0 exit=0
           pts/8        2016-12-05 22:48             18041 id=/8    term=0 exit=0
root     + pts/10       2016-11-27 09:18  old        28042 (tmux(28042).%4)
           pts/11       2016-12-01 01:47             28042 id=s/11  term=0 exit=0
root     + pts/12       2016-11-29 10:43  old        28042 (tmux(28042).%6)
root     + pts/5        2016-11-29 16:22  old        28042 (tmux(28042).%7)
           pts/3        2016-12-05 21:53             28257 id=/3    term=0 exit=0
           pts/11       2016-12-06 16:23             17939 id=/11   term=0 exit=0
           pts/13       2016-12-06 16:09              8025 id=/13   term=0 exit=0
           pts/14       2016-12-08 09:45             19292 id=/14   term=0 exit=0
           pts/14       2016-12-06 19:44             23597 id=s/14  term=0 exit=0
           pts/15       2016-12-08 09:45              1166 id=s/15  term=0 exit=0
           pts/16       2016-12-13 17:16             28141 id=/16   term=0 exit=0
           pts/16       2016-12-09 10:14             22783 id=s/16  term=0 exit=0
           pts/17       2016-12-08 23:51              6201 id=/17   term=0 exit=0
           pts/18       2016-12-31 14:34             24454 id=/18   term=0 exit=0
           pts/20       2016-12-31 14:42             16076 id=/20   term=0 exit=0
root     + pts/18       2016-12-31 14:40   .          5446 (192.168.1.5)
           pts/19       2016-12-31 14:41             10815 id=/19   term=0 exit=0

 

 

To kill the active sessions, grab the PID from the above command and issue a kill on it:

kill [PID]

 

Now I can login again from this plugin. Would be nice if this plugin had some type of an ability to clear idle sessions.

Share this post


Link to post

updated shellinabox to latest 2.20

Notable changes/fixes:

  • OpenSSL 1.1 fixes
  • May build with MUSL library
  • Fixed issue #222, LOGIN service
  • Fixed issue #360, ignore escape sequences to fix dir listing
  • Fix for function key presses
  • Adjusting scale on IE
  • New option to disable peer check (issue #364)
  • Add option for custom SSH port
  • Support for APL characters
  • PDF documentation
  • Fix for BSD build
  • New ready event support for iframe messages

Share this post


Link to post
1 minute ago, michael123 said:

Great work!

 

Is it possible to replace the (non-working) built-in Terminal?

Too many clicks to invoke the shell..

You can stick it right on the tabs via the Custom Tab plugin.

Share this post


Link to post
17 minutes ago, Squid said:

You can stick it right on the tabs via the Custom Tab plugin.

 

I tried few options..

 

How do I exactly define this tab, that will connect to the box via its IP using port 4200?

Share this post


Link to post
24 minutes ago, Squid said:

You can stick it right on the tabs via the Custom Tab plugin.

 

I need to enter full url, and the window is not resizable :-(

 

 

Share this post


Link to post
1 hour ago, michael123 said:

 

I need to enter full url, and the window is not resizable :-(

 

 

Use Built-In Page and select Command Line.page

Share this post


Link to post
On 2/15/2018 at 1:49 PM, michael123 said:

Great work!

 

Is it possible to replace the (non-working) built-in Terminal?

Too many clicks to invoke the shell..

I added a setting to replace the built in terminal button with a command line button.

I also added support for built in 6.4 certs so if you enable ssl in unRAID it will point to /etc/ssl/certs/unraid_bundle.pem. So this will work with the self signed or the letsencrypt cert.

It will go to https://yourunraidhostkey.unraid.net:port

Share this post


Link to post
9 minutes ago, dmacias said:

I added a setting to replace the built in terminal button with a command line button.

I also added support for built in 6.4 certs so if you enable ssl in unRAID it will point to /etc/ssl/certs/unraid_bundle.pem. So this will work with the self signed or the letsencrypt cert.

It will go to https://yourunraidhostkey.unraid.net:port

 

Thanks,

is there an option to use IP address rather than dns entry for the host?

.. or it just generates a relative url

Share this post


Link to post
 
Thanks,
is there an option to use IP address rather than dns entry for the host?
.. or it just generates a relative url
Yes there's a setting Connect by IP address.

Share this post


Link to post

If unRAID is running on a different port, eg 88 because nginx is proxying for you on port 80. The URL for the Terminal becomes http://ip:88:4200 which obviously is wrong.

Share this post


Link to post
If unRAID is running on a different port, eg 88 because nginx is proxying for you on port 80. The URL for the Terminal becomes http://ip:88:4200 which obviously is wrong.
Thanks. I'll fix that.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.