mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-772) After login using SSHServer program ...It displays "/bin/sh: 0: can't access tty; job control turned off". How to solve this problem?
Date Fri, 15 Sep 2017 08:34:00 GMT

    [ https://issues.apache.org/jira/browse/SSHD-772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16167535#comment-16167535
] 

Goldstein Lyor commented on SSHD-772:
-------------------------------------

As far as I can tell this has nothing to with SSHD but rather with the underlying shell (a
quick search yielded [this article|https://superuser.com/questions/410472/bin-sh-cant-access-tty-job-control-turned-off-error-when-running-shellcode]
for example). That being said, here are a few suggestions:

* The {{SshServer}} class has a _main_ method that you can invoke - it will setup MINA SSHD
correctly *and* accept many of the arguments that the regular _sshd_ accepts - including {{-p
2222}} telling it to listen on that port. It has a shell factory so give it a try.
* Have you tried logging in to the same server/user using regular SSH client ?
* Please bear in mind that the _sshd_ daemon does much (much much) more than the Java code
when it opens a shell - the Java code only attempts the most likely scenario, but if your
server requires some special setup for TTY then that's something to be dealt with *outside*
the Java code
* As indicated, the STDIN/STDOUT/STDERR streams used by the shell use some default settings
- not all shells though use these defaults, so extra coding and/or configuration may be required.

I am renewing my suggestion to post this on the {{dev@mina.apache.org}} mailing list and thus
gain more exposure to this issue and greatly increasing the chances that someone may be able
to help you. As it stands right now, it does not seem like a Java issue (at least not a pure
one) and unfortunately I am not an expert on the _sshd_ daemon or the _Linux_ shell.

> After login using SSHServer program ...It displays "/bin/sh: 0: can't access tty; job
control turned off". How to solve this problem?
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-772
>                 URL: https://issues.apache.org/jira/browse/SSHD-772
>             Project: MINA SSHD
>          Issue Type: Question
>    Affects Versions: 1.6.0
>         Environment: Ubuntu 16.04 LTS
>            Reporter: Amit Kumar
>
> After login using SSHServer program ...It displays "/bin/sh: 0: can't access tty; job
control turned off". How to solve this problem



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message