[ 
https://issues.apache.org/jira/browse/KARAF-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Offenbach updated KARAF-4713:
----------------------------------
    Description: 
I am locked in to my system via SSH as user "root". When I change to the user 
"karaf" that owns and executes the Karaf Container and try to login to the 
server (The client ssh key was enabled in keys.properties) using:
{code}
root@testhost: su - karaf
karaf@testhost: client -v
{code}

I get the following error:
{code}
java.io.IOException: Error executing 'stty -F /dev/pts/0 -a': stty: /dev/pts/0: 
Permission denied

        at org.jline.terminal.impl.ExecPty.exec(ExecPty.java:278)
        at org.jline.terminal.impl.ExecPty.doGetConfig(ExecPty.java:157)
        at org.jline.terminal.impl.ExecPty.getAttr(ExecPty.java:88)
        at 
org.jline.terminal.impl.AbstractPosixTerminal.<init>(AbstractPosixTerminal.java:19)
        at 
org.jline.terminal.impl.PosixSysTerminal.<init>(PosixSysTerminal.java:36)
        at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:145)
        at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:93)
        at org.jline.terminal.TerminalBuilder.terminal(TerminalBuilder.java:36)
        at org.apache.karaf.client.Main.main(Main.java:158)
{code}

The issue is a new one in Karaf 4.1.0. It does not occur in the last stable 
release Karaf 4.0.6.

I switched to debug. This is the output when login fails:
{code}
2016-09-14T15:18:24,966 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | Server 
session created Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]
2016-09-14T15:18:24,979 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
SessionTimeoutListener           | 48 - org.apache.sshd.core - 1.2.0 | 
sessionCreated(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) tracking
2016-09-14T15:18:24,981 | WARN  | sshd-SshServer[420249ea]-nio2-thread-1 | 
VersionProperties$LazyHolder     | 48 - org.apache.sshd.core - 1.2.0 | Failed 
(FileNotFoundException) to load version properties: Resource does not exists
2016-09-14T15:18:24,981 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
sendIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]): 
SSH-2.0-SSHD-UNKNOWN
2016-09-14T15:18:24,982 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
22 bytes
2016-09-14T15:18:24,989 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=22
2016-09-14T15:18:24,992 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 729 bytes
2016-09-14T15:18:24,992 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
doReadIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
line='SSH-2.0-SSHD-CORE-1.2.0'
2016-09-14T15:18:24,993 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
readIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) client 
version string: SSH-2.0-SSHD-CORE-1.2.0
2016-09-14T15:18:25,013 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
SimpleGeneratorHostKeyProvider   | 48 - org.apache.sshd.core - 1.2.0 | 
resolveKeyPair(/opt/apache-karaf/etc/host.key) loaded 
key=ssh-rsa-SHA256:8HfU+9gdtN/stc9D0jaiIvUGQYXRJxSnfdS7FqK6nWw
2016-09-14T15:18:25,015 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
sendKexInit(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Send SSH_MSG_KEXINIT
2016-09-14T15:18:25,015 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
400 bytes
2016-09-14T15:18:25,016 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=400
2016-09-14T15:18:25,017 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleKexInit(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) SSH_MSG_KEXINIT
2016-09-14T15:18:25,018 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
setNegotiationResult(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Kex: 
server->client aes128-ctr hmac-sha1 none
2016-09-14T15:18:25,018 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
setNegotiationResult(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Kex: 
client->server aes128-ctr hmac-sha1 none
2016-09-14T15:18:25,029 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 152 bytes
2016-09-14T15:18:25,038 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
DHGServer                        | 48 - org.apache.sshd.core - 1.2.0 | 
next(DHGServer[ecdh-sha2-nistp521])[ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]]
 process command=SSH_MSG_KEXDH_INIT
2016-09-14T15:18:25,256 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
DHGServer                        | 48 - org.apache.sshd.core - 1.2.0 | 
next(DHGServer[ecdh-sha2-nistp521])[ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]]
 Send SSH_MSG_KEXDH_REPLY
2016-09-14T15:18:25,257 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
1224 bytes
2016-09-14T15:18:25,258 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=1224
2016-09-14T15:18:25,267 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleKexMessage(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])[ecdh-sha2-nistp521]
 KEX processing complete after cmd=30
2016-09-14T15:18:25,267 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
sendNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Send SSH_MSG_NEWKEYS
2016-09-14T15:18:25,268 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
16 bytes
2016-09-14T15:18:25,270 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=16
2016-09-14T15:18:25,315 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 16 bytes
2016-09-14T15:18:25,318 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) SSH_MSG_NEWKEYS 
command=SSH_MSG_NEWKEYS
2016-09-14T15:18:25,318 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
receiveNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) session 
ID=f0:36:cd:fd:1e:ed:f5:2c:bf:ad:45:c2:ed:6d:64:03:07:e6:98:63:60:5d:45:6c:06:5f:b2:75:5e:d0:01:3a:aa:bc:5a:ab:80:94:a2:aa:a5:d4:6a:51:75:f9:d2:82:90:a2:81:ef:a3:13:6d:c5:a9:e7:7f:e5:f4:5f:56:39
2016-09-14T15:18:25,332 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
receiveNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
inCipher=BaseCipher[AES,16,16,AES/CTR/NoPadding], 
outCipher=BaseCipher[AES,16,16,AES/CTR/NoPadding], recommended blocks 
limit=4294967296, actual=4294967296
2016-09-14T15:18:25,346 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 68 bytes
2016-09-14T15:18:25,347 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleServiceRequest(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
SSH_MSG_SERVICE_REQUEST 'ssh-userauth'
2016-09-14T15:18:25,350 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
ServerUserAuthService(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
authorized authentication methods: keyboard-interactive,password,publickey
2016-09-14T15:18:25,351 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleServiceRequest(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Accepted 
service ssh-userauth
2016-09-14T15:18:25,356 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
68 bytes
2016-09-14T15:18:25,358 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=68
2016-09-14T15:18:25,358 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 84 bytes
2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=none
2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
'karaf' with service 'ssh-connection' and method 'none' (attempt 0 / 20)
2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) no authentication 
factory for method=none
2016-09-14T15:18:25,360 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationFailure(null@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 SSH_MSG_USERAUTH_REQUEST
2016-09-14T15:18:25,360 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationFailure(null@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 remaining methods: keyboard-interactive,password,publickey
2016-09-14T15:18:25,361 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
100 bytes
2016-09-14T15:18:25,361 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=100
2016-09-14T15:18:25,369 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 548 bytes
2016-09-14T15:18:25,370 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=publickey
2016-09-14T15:18:25,370 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
'karaf' with service 'ssh-connection' and method 'publickey' (attempt 1 / 20)
2016-09-14T15:18:25,374 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) verify key 
type=ssh-dss, 
factories=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,
 fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
2016-09-14T15:18:25,403 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo - authentication 
result: true
2016-09-14T15:18:25,404 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) send 
SSH_MSG_USERAUTH_PK_OK for key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
2016-09-14T15:18:25,405 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
500 bytes
2016-09-14T15:18:25,405 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=500
2016-09-14T15:18:25,406 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationInProgress(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 SSH_MSG_USERAUTH_REQUEST
2016-09-14T15:18:25,424 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 596 bytes
2016-09-14T15:18:25,425 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=publickey
2016-09-14T15:18:25,426 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
'karaf' with service 'ssh-connection' and method 'publickey' (attempt 2 / 20)
2016-09-14T15:18:25,427 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) verify key 
type=ssh-dss, 
factories=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,
 fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
2016-09-14T15:18:25,430 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo - authentication 
result: true
2016-09-14T15:18:25,434 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo - verified
2016-09-14T15:18:25,435 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationSuccess(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 SSH_MSG_USERAUTH_REQUEST
2016-09-14T15:18:25,436 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
52 bytes
2016-09-14T15:18:25,436 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=52
2016-09-14T15:18:25,455 | INFO  | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | Session 
karaf@/0:0:0:0:0:0:0:1:34574 authenticated
2016-09-14T15:18:25,491 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) Socket has been disconnected (result=-1), 
closing IoSession now
2016-09-14T15:18:25,491 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, remote=/0:0:0:0:0:0:0:1:34574]) 
Closing immediately
2016-09-14T15:18:25,492 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]) Closing immediately
2016-09-14T15:18:25,492 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
SessionTimeoutListener           | 48 - org.apache.sshd.core - 1.2.0 | 
sessionClosed(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]) un-tracked
2016-09-14T15:18:25,495 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerConnectionService          | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerConnectionService[ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]]) 
Closing immediately
2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerConnectionService          | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerConnectionService[ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]])[Immediately]
 closed
2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574])[Immediately] state already Closed
2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
SequentialCloseable              | 48 - org.apache.sshd.core - 1.2.0 | 
doClose(true) signal close complete
2016-09-14T15:18:25,497 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574])[Immediately] closed
2016-09-14T15:18:25,497 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574])[Immediately] closed
{code}

  was:
I am locked in to my system via SSH as user "root". When I change to the user 
"karaf" that owns and executes the Karaf Container and try to login to the 
server (The client ssh key was enabled in keys.properties) using:
{code}
root@test-host: su - karaf
karaf@test-host: client -v
{code}

I get the following error:
{code}
java.io.IOException: Error executing 'stty -F /dev/pts/0 -a': stty: /dev/pts/0: 
Permission denied

        at org.jline.terminal.impl.ExecPty.exec(ExecPty.java:278)
        at org.jline.terminal.impl.ExecPty.doGetConfig(ExecPty.java:157)
        at org.jline.terminal.impl.ExecPty.getAttr(ExecPty.java:88)
        at 
org.jline.terminal.impl.AbstractPosixTerminal.<init>(AbstractPosixTerminal.java:19)
        at 
org.jline.terminal.impl.PosixSysTerminal.<init>(PosixSysTerminal.java:36)
        at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:145)
        at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:93)
        at org.jline.terminal.TerminalBuilder.terminal(TerminalBuilder.java:36)
        at org.apache.karaf.client.Main.main(Main.java:158)
{code}

The issue is a new one in Karaf 4.1.0. It does not occur in the last stable 
release Karaf 4.0.6.

I switched to debug. This is the output when login fails:
{code}
2016-09-14T15:18:24,966 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | Server 
session created Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]
2016-09-14T15:18:24,979 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
SessionTimeoutListener           | 48 - org.apache.sshd.core - 1.2.0 | 
sessionCreated(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) tracking
2016-09-14T15:18:24,981 | WARN  | sshd-SshServer[420249ea]-nio2-thread-1 | 
VersionProperties$LazyHolder     | 48 - org.apache.sshd.core - 1.2.0 | Failed 
(FileNotFoundException) to load version properties: Resource does not exists
2016-09-14T15:18:24,981 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
sendIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]): 
SSH-2.0-SSHD-UNKNOWN
2016-09-14T15:18:24,982 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
22 bytes
2016-09-14T15:18:24,989 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=22
2016-09-14T15:18:24,992 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 729 bytes
2016-09-14T15:18:24,992 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
doReadIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
line='SSH-2.0-SSHD-CORE-1.2.0'
2016-09-14T15:18:24,993 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
readIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) client 
version string: SSH-2.0-SSHD-CORE-1.2.0
2016-09-14T15:18:25,013 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
SimpleGeneratorHostKeyProvider   | 48 - org.apache.sshd.core - 1.2.0 | 
resolveKeyPair(/opt/apache-karaf/etc/host.key) loaded 
key=ssh-rsa-SHA256:8HfU+9gdtN/stc9D0jaiIvUGQYXRJxSnfdS7FqK6nWw
2016-09-14T15:18:25,015 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
sendKexInit(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Send SSH_MSG_KEXINIT
2016-09-14T15:18:25,015 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
400 bytes
2016-09-14T15:18:25,016 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=400
2016-09-14T15:18:25,017 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleKexInit(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) SSH_MSG_KEXINIT
2016-09-14T15:18:25,018 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
setNegotiationResult(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Kex: 
server->client aes128-ctr hmac-sha1 none
2016-09-14T15:18:25,018 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
setNegotiationResult(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Kex: 
client->server aes128-ctr hmac-sha1 none
2016-09-14T15:18:25,029 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 152 bytes
2016-09-14T15:18:25,038 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
DHGServer                        | 48 - org.apache.sshd.core - 1.2.0 | 
next(DHGServer[ecdh-sha2-nistp521])[ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]]
 process command=SSH_MSG_KEXDH_INIT
2016-09-14T15:18:25,256 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
DHGServer                        | 48 - org.apache.sshd.core - 1.2.0 | 
next(DHGServer[ecdh-sha2-nistp521])[ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]]
 Send SSH_MSG_KEXDH_REPLY
2016-09-14T15:18:25,257 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
1224 bytes
2016-09-14T15:18:25,258 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=1224
2016-09-14T15:18:25,267 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleKexMessage(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])[ecdh-sha2-nistp521]
 KEX processing complete after cmd=30
2016-09-14T15:18:25,267 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
sendNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Send SSH_MSG_NEWKEYS
2016-09-14T15:18:25,268 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
16 bytes
2016-09-14T15:18:25,270 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=16
2016-09-14T15:18:25,315 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 16 bytes
2016-09-14T15:18:25,318 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) SSH_MSG_NEWKEYS 
command=SSH_MSG_NEWKEYS
2016-09-14T15:18:25,318 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
receiveNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) session 
ID=f0:36:cd:fd:1e:ed:f5:2c:bf:ad:45:c2:ed:6d:64:03:07:e6:98:63:60:5d:45:6c:06:5f:b2:75:5e:d0:01:3a:aa:bc:5a:ab:80:94:a2:aa:a5:d4:6a:51:75:f9:d2:82:90:a2:81:ef:a3:13:6d:c5:a9:e7:7f:e5:f4:5f:56:39
2016-09-14T15:18:25,332 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
receiveNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
inCipher=BaseCipher[AES,16,16,AES/CTR/NoPadding], 
outCipher=BaseCipher[AES,16,16,AES/CTR/NoPadding], recommended blocks 
limit=4294967296, actual=4294967296
2016-09-14T15:18:25,346 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 68 bytes
2016-09-14T15:18:25,347 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleServiceRequest(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
SSH_MSG_SERVICE_REQUEST 'ssh-userauth'
2016-09-14T15:18:25,350 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
ServerUserAuthService(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
authorized authentication methods: keyboard-interactive,password,publickey
2016-09-14T15:18:25,351 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
handleServiceRequest(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Accepted 
service ssh-userauth
2016-09-14T15:18:25,356 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
68 bytes
2016-09-14T15:18:25,358 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=68
2016-09-14T15:18:25,358 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 84 bytes
2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=none
2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
'karaf' with service 'ssh-connection' and method 'none' (attempt 0 / 20)
2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) no authentication 
factory for method=none
2016-09-14T15:18:25,360 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationFailure(null@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 SSH_MSG_USERAUTH_REQUEST
2016-09-14T15:18:25,360 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationFailure(null@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 remaining methods: keyboard-interactive,password,publickey
2016-09-14T15:18:25,361 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
100 bytes
2016-09-14T15:18:25,361 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=100
2016-09-14T15:18:25,369 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 548 bytes
2016-09-14T15:18:25,370 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=publickey
2016-09-14T15:18:25,370 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
'karaf' with service 'ssh-connection' and method 'publickey' (attempt 1 / 20)
2016-09-14T15:18:25,374 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) verify key 
type=ssh-dss, 
factories=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,
 fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
2016-09-14T15:18:25,403 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo - authentication 
result: true
2016-09-14T15:18:25,404 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) send 
SSH_MSG_USERAUTH_PK_OK for key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
2016-09-14T15:18:25,405 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
500 bytes
2016-09-14T15:18:25,405 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=500
2016-09-14T15:18:25,406 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationInProgress(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 SSH_MSG_USERAUTH_REQUEST
2016-09-14T15:18:25,424 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) read 596 bytes
2016-09-14T15:18:25,425 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=publickey
2016-09-14T15:18:25,426 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
'karaf' with service 'ssh-connection' and method 'publickey' (attempt 2 / 20)
2016-09-14T15:18:25,427 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) verify key 
type=ssh-dss, 
factories=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,
 fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
2016-09-14T15:18:25,430 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo - authentication 
result: true
2016-09-14T15:18:25,434 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key type=ssh-dss, 
fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo - verified
2016-09-14T15:18:25,435 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
handleAuthenticationSuccess(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
 SSH_MSG_USERAUTH_REQUEST
2016-09-14T15:18:25,436 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | Writing 
52 bytes
2016-09-14T15:18:25,436 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=52
2016-09-14T15:18:25,455 | INFO  | sshd-SshServer[420249ea]-nio2-thread-2 | 
ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | Session 
karaf@/0:0:0:0:0:0:0:1:34574 authenticated
2016-09-14T15:18:25,491 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574]) Socket has been disconnected (result=-1), 
closing IoSession now
2016-09-14T15:18:25,491 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, remote=/0:0:0:0:0:0:0:1:34574]) 
Closing immediately
2016-09-14T15:18:25,492 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]) Closing immediately
2016-09-14T15:18:25,492 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
SessionTimeoutListener           | 48 - org.apache.sshd.core - 1.2.0 | 
sessionClosed(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]) un-tracked
2016-09-14T15:18:25,495 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerConnectionService          | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerConnectionService[ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]]) 
Closing immediately
2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerConnectionService          | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerConnectionService[ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]])[Immediately]
 closed
2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574])[Immediately] state already Closed
2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
SequentialCloseable              | 48 - org.apache.sshd.core - 1.2.0 | 
doClose(true) signal close complete
2016-09-14T15:18:25,497 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
close(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574])[Immediately] closed
2016-09-14T15:18:25,497 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
remote=/0:0:0:0:0:0:0:1:34574])[Immediately] closed
{code}


> Using client fails with Error executing 'stty -F /dev/pts/0 -a': stty: 
> /dev/pts/0: Permission denied
> ----------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-4713
>                 URL: https://issues.apache.org/jira/browse/KARAF-4713
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.0
>         Environment: Ubuntu 16.04. LTS, kernel 4.4.0-36-generic, openjdk 
> 1.8.0_91
>            Reporter: Jens Offenbach
>              Labels: client, jline, ssh-agent, sshd
>
> I am locked in to my system via SSH as user "root". When I change to the user 
> "karaf" that owns and executes the Karaf Container and try to login to the 
> server (The client ssh key was enabled in keys.properties) using:
> {code}
> root@testhost: su - karaf
> karaf@testhost: client -v
> {code}
> I get the following error:
> {code}
> java.io.IOException: Error executing 'stty -F /dev/pts/0 -a': stty: 
> /dev/pts/0: Permission denied
>         at org.jline.terminal.impl.ExecPty.exec(ExecPty.java:278)
>         at org.jline.terminal.impl.ExecPty.doGetConfig(ExecPty.java:157)
>         at org.jline.terminal.impl.ExecPty.getAttr(ExecPty.java:88)
>         at 
> org.jline.terminal.impl.AbstractPosixTerminal.<init>(AbstractPosixTerminal.java:19)
>         at 
> org.jline.terminal.impl.PosixSysTerminal.<init>(PosixSysTerminal.java:36)
>         at 
> org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:145)
>         at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:93)
>         at 
> org.jline.terminal.TerminalBuilder.terminal(TerminalBuilder.java:36)
>         at org.apache.karaf.client.Main.main(Main.java:158)
> {code}
> The issue is a new one in Karaf 4.1.0. It does not occur in the last stable 
> release Karaf 4.0.6.
> I switched to debug. This is the output when login fails:
> {code}
> 2016-09-14T15:18:24,966 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | Server 
> session created Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]
> 2016-09-14T15:18:24,979 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> SessionTimeoutListener           | 48 - org.apache.sshd.core - 1.2.0 | 
> sessionCreated(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) tracking
> 2016-09-14T15:18:24,981 | WARN  | sshd-SshServer[420249ea]-nio2-thread-1 | 
> VersionProperties$LazyHolder     | 48 - org.apache.sshd.core - 1.2.0 | Failed 
> (FileNotFoundException) to load version properties: Resource does not exists
> 2016-09-14T15:18:24,981 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> sendIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]): 
> SSH-2.0-SSHD-UNKNOWN
> 2016-09-14T15:18:24,982 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 22 bytes
> 2016-09-14T15:18:24,989 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=22
> 2016-09-14T15:18:24,992 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 729 bytes
> 2016-09-14T15:18:24,992 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> doReadIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
> line='SSH-2.0-SSHD-CORE-1.2.0'
> 2016-09-14T15:18:24,993 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> readIdentification(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) client 
> version string: SSH-2.0-SSHD-CORE-1.2.0
> 2016-09-14T15:18:25,013 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> SimpleGeneratorHostKeyProvider   | 48 - org.apache.sshd.core - 1.2.0 | 
> resolveKeyPair(/opt/apache-karaf/etc/host.key) loaded 
> key=ssh-rsa-SHA256:8HfU+9gdtN/stc9D0jaiIvUGQYXRJxSnfdS7FqK6nWw
> 2016-09-14T15:18:25,015 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> sendKexInit(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Send 
> SSH_MSG_KEXINIT
> 2016-09-14T15:18:25,015 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 400 bytes
> 2016-09-14T15:18:25,016 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=400
> 2016-09-14T15:18:25,017 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> handleKexInit(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) SSH_MSG_KEXINIT
> 2016-09-14T15:18:25,018 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> setNegotiationResult(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Kex: 
> server->client aes128-ctr hmac-sha1 none
> 2016-09-14T15:18:25,018 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> setNegotiationResult(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Kex: 
> client->server aes128-ctr hmac-sha1 none
> 2016-09-14T15:18:25,029 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 152 bytes
> 2016-09-14T15:18:25,038 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> DHGServer                        | 48 - org.apache.sshd.core - 1.2.0 | 
> next(DHGServer[ecdh-sha2-nistp521])[ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]]
>  process command=SSH_MSG_KEXDH_INIT
> 2016-09-14T15:18:25,256 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> DHGServer                        | 48 - org.apache.sshd.core - 1.2.0 | 
> next(DHGServer[ecdh-sha2-nistp521])[ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]]
>  Send SSH_MSG_KEXDH_REPLY
> 2016-09-14T15:18:25,257 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 1224 bytes
> 2016-09-14T15:18:25,258 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=1224
> 2016-09-14T15:18:25,267 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> handleKexMessage(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])[ecdh-sha2-nistp521]
>  KEX processing complete after cmd=30
> 2016-09-14T15:18:25,267 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> sendNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Send 
> SSH_MSG_NEWKEYS
> 2016-09-14T15:18:25,268 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 16 bytes
> 2016-09-14T15:18:25,270 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=16
> 2016-09-14T15:18:25,315 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 16 bytes
> 2016-09-14T15:18:25,318 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> handleNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) SSH_MSG_NEWKEYS 
> command=SSH_MSG_NEWKEYS
> 2016-09-14T15:18:25,318 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> receiveNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) session 
> ID=f0:36:cd:fd:1e:ed:f5:2c:bf:ad:45:c2:ed:6d:64:03:07:e6:98:63:60:5d:45:6c:06:5f:b2:75:5e:d0:01:3a:aa:bc:5a:ab:80:94:a2:aa:a5:d4:6a:51:75:f9:d2:82:90:a2:81:ef:a3:13:6d:c5:a9:e7:7f:e5:f4:5f:56:39
> 2016-09-14T15:18:25,332 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> receiveNewKeys(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
> inCipher=BaseCipher[AES,16,16,AES/CTR/NoPadding], 
> outCipher=BaseCipher[AES,16,16,AES/CTR/NoPadding], recommended blocks 
> limit=4294967296, actual=4294967296
> 2016-09-14T15:18:25,346 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 68 bytes
> 2016-09-14T15:18:25,347 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> handleServiceRequest(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
> SSH_MSG_SERVICE_REQUEST 'ssh-userauth'
> 2016-09-14T15:18:25,350 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> ServerUserAuthService(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) 
> authorized authentication methods: keyboard-interactive,password,publickey
> 2016-09-14T15:18:25,351 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> handleServiceRequest(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Accepted 
> service ssh-userauth
> 2016-09-14T15:18:25,356 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 68 bytes
> 2016-09-14T15:18:25,358 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=68
> 2016-09-14T15:18:25,358 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 84 bytes
> 2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
> SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=none
> 2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
> 'karaf' with service 'ssh-connection' and method 'none' (attempt 0 / 20)
> 2016-09-14T15:18:25,359 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) no authentication 
> factory for method=none
> 2016-09-14T15:18:25,360 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> handleAuthenticationFailure(null@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
>  SSH_MSG_USERAUTH_REQUEST
> 2016-09-14T15:18:25,360 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> handleAuthenticationFailure(null@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
>  remaining methods: keyboard-interactive,password,publickey
> 2016-09-14T15:18:25,361 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 100 bytes
> 2016-09-14T15:18:25,361 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=100
> 2016-09-14T15:18:25,369 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 548 bytes
> 2016-09-14T15:18:25,370 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
> SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=publickey
> 2016-09-14T15:18:25,370 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
> 'karaf' with service 'ssh-connection' and method 'publickey' (attempt 1 / 20)
> 2016-09-14T15:18:25,374 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
> doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) verify key 
> type=ssh-dss, 
> factories=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,
>  fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
> 2016-09-14T15:18:25,403 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
> doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key 
> type=ssh-dss, fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo 
> - authentication result: true
> 2016-09-14T15:18:25,404 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
> doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) send 
> SSH_MSG_USERAUTH_PK_OK for key type=ssh-dss, 
> fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
> 2016-09-14T15:18:25,405 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 500 bytes
> 2016-09-14T15:18:25,405 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=500
> 2016-09-14T15:18:25,406 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-1 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> handleAuthenticationInProgress(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
>  SSH_MSG_USERAUTH_REQUEST
> 2016-09-14T15:18:25,424 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) read 596 bytes
> 2016-09-14T15:18:25,425 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Received 
> SSH_MSG_USERAUTH_REQUEST user=karaf, service=ssh-connection, method=publickey
> 2016-09-14T15:18:25,426 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> process(ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) Authenticating user 
> 'karaf' with service 'ssh-connection' and method 'publickey' (attempt 2 / 20)
> 2016-09-14T15:18:25,427 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
> doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) verify key 
> type=ssh-dss, 
> factories=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,
>  fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo
> 2016-09-14T15:18:25,430 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
> doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key 
> type=ssh-dss, fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo 
> - authentication result: true
> 2016-09-14T15:18:25,434 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> UserAuthPublicKey                | 48 - org.apache.sshd.core - 1.2.0 | 
> doAuth(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574]) key 
> type=ssh-dss, fingerprint=SHA256:SwlJLzBJAg9/gr6sLqJXTNmMn9h40zB5hELjJiZHyOo 
> - verified
> 2016-09-14T15:18:25,435 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> handleAuthenticationSuccess(karaf@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:34574])
>  SSH_MSG_USERAUTH_REQUEST
> 2016-09-14T15:18:25,436 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> Writing 52 bytes
> 2016-09-14T15:18:25,436 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-2 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleCompletedWriteCycle(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) finished writing len=52
> 2016-09-14T15:18:25,455 | INFO  | sshd-SshServer[420249ea]-nio2-thread-2 | 
> ServerUserAuthService            | 48 - org.apache.sshd.core - 1.2.0 | 
> Session karaf@/0:0:0:0:0:0:0:1:34574 authenticated
> 2016-09-14T15:18:25,491 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) Socket has been disconnected (result=-1), 
> closing IoSession now
> 2016-09-14T15:18:25,491 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574]) Closing immediately
> 2016-09-14T15:18:25,492 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> close(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]) Closing immediately
> 2016-09-14T15:18:25,492 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> SessionTimeoutListener           | 48 - org.apache.sshd.core - 1.2.0 | 
> sessionClosed(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]) un-tracked
> 2016-09-14T15:18:25,495 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerConnectionService          | 48 - org.apache.sshd.core - 1.2.0 | 
> close(ServerConnectionService[ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]])
>  Closing immediately
> 2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerConnectionService          | 48 - org.apache.sshd.core - 1.2.0 | 
> close(ServerConnectionService[ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574]])[Immediately]
>  closed
> 2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574])[Immediately] state already Closed
> 2016-09-14T15:18:25,496 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> SequentialCloseable              | 48 - org.apache.sshd.core - 1.2.0 | 
> doClose(true) signal close complete
> 2016-09-14T15:18:25,497 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> ServerSessionImpl                | 48 - org.apache.sshd.core - 1.2.0 | 
> close(ServerSessionImpl[karaf@/0:0:0:0:0:0:0:1:34574])[Immediately] closed
> 2016-09-14T15:18:25,497 | DEBUG | sshd-SshServer[420249ea]-nio2-thread-3 | 
> Nio2Session                      | 48 - org.apache.sshd.core - 1.2.0 | 
> close(Nio2Session[local=/0:0:0:0:0:0:0:1:8101, 
> remote=/0:0:0:0:0:0:0:1:34574])[Immediately] closed
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to