Re: Why does my ssh session terminate immediately?
thanks again for all your help.
Vincent Lefevre <firstname.lastname@example.org> writes:
> On 2013-04-24 23:38:06 +0200, Andreas Leha wrote:
>> Vincent Lefevre <email@example.com> writes:
>> > On 2013-04-24 05:03:53 +0200, Andreas Leha wrote:
>> >> Vincent Lefevre <firstname.lastname@example.org> writes:
>> >> >> BTW, does "ssh -t localhost" work on both machines?
>> >> I am not sure. On the 'client' it does. On the 'server' I get this:
>> >> ,----
>> >> | > ssh email@example.com bash
>> >> | ssh -t localhost
>> >> | Pseudo-terminal will not be allocated because stdin is not a terminal.
>> >> | Host key verification failed.
>> >> `----
>> > That's normal if you don't have a tty in the first place.
>> > Don't you have some kind of console?
>> I am not sure I understand that question.
> Is there some kind of terminal access without needing ssh or telnet?
No, unfortunately not. Only via network.
>> > $ ssh -t firstname.lastname@example.org ls -l /dev/pts
>> Here, I get
>> | total 0
>> | crw--w---- 1 root tty 136, 0 Apr 24 21:19 0
>> | c--------- 1 root root 5, 2 Jan 1 1970 ptmx
>> | Connection to 192.168.2.109 closed.
> One can see that pts/0 has been created and used.
>> > You can also try whether telnet over SSH works... Or just simple
>> > telnet if the local network is secure. If this works, you can try
>> > again "ssh -t localhost" (or just "ssh localhost", since -t is
>> > implied without a command) from there.
>> I get the same problem using telnet:
>> | > telnet 192.168.2.109
>> | Trying 192.168.2.109...
>> | Connected to 192.168.2.109.
>> | Escape character is '^]'.
>> | Debian GNU/Linux 6.0
>> | debian login: andreas
>> | Password:
>> | Last login: Wed Apr 24 21:35:35 UTC 2013 from 192.168.2.101 on pts/0
>> | Linux debian 2.6.32-5-kirkwood #1 Sun May 6 16:57:51 UTC 2012 armv5tel
>> | The programs included with the Debian GNU/Linux system are free software;
>> | the exact distribution terms for each program are described in the
>> | individual files in /usr/share/doc/*/copyright.
>> | Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
>> | permitted by applicable law.
>> | Connection closed by foreign host.
> So, it seems that pts/0 has correctly been allocated.
> But in both cases (ssh and telnet), there's a problem. Since it
> happens also with telnet, I doubt there's any problem with sshd.
> Perhaps a bug related to the (pseudo-)ttys.
> Look at /var/log/messages on the remote machine to see if there is
> any error message. Just in case...
I have no file '/var/log/messages'....
> You can also search Google for "Connection closed by foreign host".
> According to
> there was a recent bug affecting Raspberry Pi (ARM). Your machine is
> also ARM-based. It might be related...
Thanks for that pointer. I got the corresponding commit:
| hangeset f7753f053449 in /var/www/hg/openbricks
| author: warped-rudi <email@example.com>
| details: http://hg.openbricks.org/openbricks?cmd=changeset;node=f7753f053449
| [RPi] kernel: enable telnetd
| config/platforms/arm/bcm2708/linux.conf | 3 ++-
| 1 files changed, 2 insertions(+), 1 deletions(-)
| diffs (13 lines):
| diff -r 0329ffe73d78 -r f7753f053449 config/platforms/arm/bcm2708/linux.conf
| --- a/config/platforms/arm/bcm2708/linux.conf Tue Feb 05 23:36:10 2013 +0100
| +++ b/config/platforms/arm/bcm2708/linux.conf Wed Feb 06 19:58:17 2013 +0100
| @@ -1483,7 +1483,8 @@
| # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
| -# CONFIG_LEGACY_PTYS is not set
| # CONFIG_SERIAL_NONSTANDARD is not set
| # CONFIG_N_GSM is not set
| # CONFIG_TRACE_SINK is not set
I did the same (which took a while as I have no prior experience in
cross compiling). Now the newly compiled kernel booted ok, but things
did not change :-(
| > ssh firstname.lastname@example.org
| Linux debian 3.2.41-dockstar #1 Sun Apr 28 15:16:21 CEST 2013 armv5tel
| The programs included with the Debian GNU/Linux system are free software;
| the exact distribution terms for each program are described in the
| individual files in /usr/share/doc/*/copyright.
| Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
| permitted by applicable law.
| Last login: Sun Apr 28 19:26:38 2013 from 192.168.2.101
| Connection to 192.168.2.109 closed.
Well, at least I learned sth about cross compiling.
PS: I'd still be grateful for more pointers....