Open GoogleCodeExporter opened 9 years ago
anyone have a same issue ?
Original comment by frysha...@gmail.com
on 11 Sep 2010 at 11:44
I to, am having this issue. It's very frustrating!
Original comment by noeticpe...@gmail.com
on 1 Jan 2011 at 5:20
more info! stupid enter key!
I'm using the command mode to issue a svn checkout to help our developers get
their dev environment setup. partway through it always dies with failed to find
session.
Original comment by noeticpe...@gmail.com
on 1 Jan 2011 at 5:25
Try to check the PAM config. I modified mine to
#%PAM-1.0
auth required pam_nologin.so
auth include system-auth
account include system-auth
session include system-auth
password include system-auth
Original comment by frysha...@gmail.com
on 1 Jan 2011 at 5:58
FryShadow,
Do I create a new shellintheboxd file to put that pam information in? or the
sshd pam config ?
Original comment by noeticpe...@gmail.com
on 3 Jan 2011 at 1:10
this is mine:
# pwd
/etc/pam.d
# ls -la | grep shellinabox
-rw-r--r-- 1 root root 168 Sep 13 15:10 shellinabox
# more shellinabox
#%PAM-1.0
auth required pam_nologin.so
auth include system-auth
account include system-auth
session include system-auth
password include system-auth
Original comment by frysha...@gmail.com
on 3 Jan 2011 at 1:21
That actually prevents me from logging in at all.
This is an LDAP'd system and my user is not local. When I try to log in it
gives me login incorrect. this is after putting a shellinabox file in the
/etc/pam.d directory. any ideas? File contents were copy/pasted.
Original comment by noeticpe...@gmail.com
on 3 Jan 2011 at 1:27
I get the same issues with -s /:AUTH:HOME:SHELL , when it works at all (see
http://code.google.com/p/shellinabox/issues/detail?id=106&q=AUTH )
The suggested pam.d given here doesn't help. The only output I get on the page
is:
- -------
Login incorrect
Login incorrect
Maximum number of tries exceeded (3)
Session closed.
- -------
As far as I can tell, only SSH and LOGIN methods work at all; has anyone ever
gotten the AUTH/user method to work?
-Robin
Original comment by robinleepowell@gmail.com
on 3 Aug 2011 at 6:41
I am getting a similar problem:
[root@luke:/etc/pam.d]# shellinaboxd --no-beep -s /:SSH -t -d Command line: shellinaboxd --no-beep -s /:SSH -t -d Listening on port 4200 Accepted connection from localhost:58928 Handling "GET" "/shell/" localhost - - [01/Dec/2013:16:33:17 +0000] "GET /shell/ HTTP/1.0" 200 4967 Closing connection to localhost:58928 Accepted connection from localhost:58929 Handling "GET" "/shell/styles.css" localhost - - [01/Dec/2013:16:33:17 +0000] "GET /shell/styles.css HTTP/1.0" 200 7286 Closing connection to localhost:58929 Accepted connection from localhost:58930 Handling "GET" "/shell/ShellInABox.js" localhost - - [01/Dec/2013:16:33:17 +0000] "GET /shell/ShellInABox.js HTTP/1.0" 200 188602 Closing connection to localhost:58930 Accepted connection from localhost:58931 Handling "GET" "/shell/keyboard.png" localhost - - [01/Dec/2013:16:33:17 +0000] "GET /shell/keyboard.png HTTP/1.0" 200 873 Closing connection to localhost:58931 Accepted connection from localhost:58932 Handling "GET" "/shell/keyboard.html" localhost - - [01/Dec/2013:16:33:17 +0000] "GET /shell/keyboard.html HTTP/1.0" 200 3181 Closing connection to localhost:58932 Accepted connection from localhost:58933 Handling "POST" "/shell/?" Creating a new session: v/ZHRnhu4kLbmbikeXVVeg Window size changed to 71x40 localhost - - [01/Dec/2013:16:33:17 +0000] "POST /shell/? HTTP/1.0" 200 157 Closing connection to localhost:58933 Accepted connection from localhost:58934 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:17 +0000] "POST /shell/? HTTP/1.0" 200 169 Closing connection to localhost:58934 Accepted connection from localhost:58935 Handling "POST" "/shell/?" Accepted connection from localhost:58936 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58936 localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 158 Closing connection to localhost:58935 Accepted connection from localhost:58937 Handling "POST" "/shell/?" Accepted connection from localhost:58938 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58938 localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 158 Closing connection to localhost:58937 Accepted connection from localhost:58939 Handling "POST" "/shell/?" Accepted connection from localhost:58940 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58940 localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 158 Closing connection to localhost:58939 Accepted connection from localhost:58941 Handling "POST" "/shell/?" Accepted connection from localhost:58942 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:20 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58942 localhost - - [01/Dec/2013:16:33:20 +0000] "POST /shell/? HTTP/1.0" 200 161 Closing connection to localhost:58941 Child terminated Accepted connection from localhost:58943 Handling "POST" "/shell/?" Failed to find session: v/ZHRnhu4kLbmbikeXVVeg localhost - - [01/Dec/2013:16:33:20 +0000] "POST /shell/? HTTP/1.0" 400 458 Closing connection to localhost:58943
Handling "POST" "/shell/?" Accepted connection from localhost:58936 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58936 localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 158 Closing connection to localhost:58935 Accepted connection from localhost:58937 Handling "POST" "/shell/?" Accepted connection from localhost:58938 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58938 localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 158 Closing connection to localhost:58937 Accepted connection from localhost:58939 Handling "POST" "/shell/?" Accepted connection from localhost:58940 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58940 localhost - - [01/Dec/2013:16:33:19 +0000] "POST /shell/? HTTP/1.0" 200 158 Closing connection to localhost:58939 Accepted connection from localhost:58941 Handling "POST" "/shell/?" Accepted connection from localhost:58942 Handling "POST" "/shell/?" localhost - - [01/Dec/2013:16:33:20 +0000] "POST /shell/? HTTP/1.0" 200 407 Closing connection to localhost:58942 localhost - - [01/Dec/2013:16:33:20 +0000] "POST /shell/? HTTP/1.0" 200 161 Closing connection to localhost:58941 Child terminated Accepted connection from localhost:58943 Handling "POST" "/shell/?" Failed to find session: v/ZHRnhu4kLbmbikeXVVeg localhost - - [01/Dec/2013:16:33:20 +0000] "POST /shell/? HTTP/1.0" 400 458 Closing connection to localhost:58943
I have tried several other -s settings. Still get this. I am trying this on
NixOS. I've build both using a Nix expression and configure/make.
Original comment by tombe...@gmail.com
on 1 Dec 2013 at 4:36
I was able to get SSL working, but the session still closes right after I type
in a username:
localhost - - [01/Dec/2013:13:06:30 -0500] "GET /enabled.gif HTTP/1.1" 200 912
Handling "POST" "/?"
localhost - - [01/Dec/2013:13:06:35 -0500] "POST /? HTTP/1.1" 200 407
localhost - - [01/Dec/2013:13:06:35 -0500] "POST /? HTTP/1.1" 200 161
Child terminated
Handling "POST" "/?"
Failed to find session: FcOP-UBevoCJDFQHeukSmA
localhost - - [01/Dec/2013:13:06:35 -0500] "POST /? HTTP/1.1" 400 458
Closing connection to localhost:59904
^CShutting down server
Closing connection to localhost:59907
Done
Original comment by tombe...@gmail.com
on 1 Dec 2013 at 6:09
I was having this issue as well under the SSH service. You might want to
ensure that your hostname resolves to the correct IP. It would be nice for the
error in debug to indicate the SSH/DNS failure rather than "Failed to find
session" when this is the case.
Original comment by konce...@gmail.com
on 4 Dec 2013 at 11:40
I've tried both IP and hostname.
Original comment by tombe...@gmail.com
on 6 Dec 2013 at 4:10
Looking at the command you are running
"[root@luke:/etc/pam.d]# shellinaboxd --no-beep -s /:SSH -t -d"
Does "luke" resolve? When shellinabox tries to open the ssh connection it does
ssh .... user@host, in your case luke. If luke doesn't resolve to an IP where
ssh is listening then it will close quickly like you are experiencing. You can
resolve this by editing /etc/hosts if this is a standalone box and adding a
line that is "luke <tab> <your pub ip>" This makes the most sense if it is a
static IP. If it is dynamic you can put it in the line with 127.0.0.1. The
other option is getting the hostname to match up to dns properly so if your
hostname is luke and your domain is acme.com then luke.acme.com needs to
resolve to your IP.
Original comment by konce...@gmail.com
on 6 Dec 2013 at 11:49
Yeah, luke resolves. I've added it to my /etc/hosts, I can go to luke:4200 and
it brings up the login, but as soon as I hit enter to write the password, it
pops up with "Failed to find session" in the debug output and "Session closed"
in the browser.
Original comment by tombe...@gmail.com
on 7 Dec 2013 at 3:39
[deleted comment]
[deleted comment]
For future readers :)
I had the same issue on my CentOS 6.6 and I found out that the code from
shellinabox/launcher.c replaces "@localhost" in ssh command with
"@hostname.domain" (output of command uname -n) ...
[luka@hostname shellinabox]$ uname -n
hostname.domain
This is quick patch that I am using (but than you missout on nice shell prompt):
diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c
index 68d8862..3aa9100 100644
--- a/shellinabox/launcher.c
+++ b/shellinabox/launcher.c
@@ -1000,16 +1000,16 @@ static pam_handle_t *internalLogin(struct Service
*service, struct Utmp *utmp,
// Replace '@localhost' with the actual host name. This results in a nicer
// prompt when SSH asks for the password.
- char *ptr = strrchr(cmdline, '@');
- if (!strcmp(ptr + 1, "localhost")) {
- int offset = ptr + 1 - cmdline;
- check(cmdline = realloc(cmdline,
- strlen(cmdline) + strlen(fqdn) -
- strlen("localhost") + 1));
- ptr = cmdline + offset;
- *ptr = '\000';
- strncat(ptr, fqdn, strlen(fqdn));
- }
+ // char *ptr = strrchr(cmdline, '@');
+ // if (!strcmp(ptr + 1, "localhost")) {
+ // int offset = ptr + 1 - cmdline;
+ // check(cmdline = realloc(cmdline,
+ // strlen(cmdline) + strlen(fqdn) -
+ // strlen("localhost") + 1));
+ // ptr = cmdline + offset;
+ // *ptr = '\000';
+ // strncat(ptr, fqdn, strlen(fqdn));
+ // }
free((void *)service->cmdline);
service->cmdline = cmdline;
I think that the correct thing to do here is to configure host and domain name,
but i didn't try that (/etc/hosts and /etc/resolv.conf) ...
Original comment by luka.kra...@gmail.com
on 12 Jan 2015 at 9:16
Original issue reported on code.google.com by
frysha...@gmail.com
on 27 Aug 2010 at 10:24