Hi, Did you check to connect with the user from the command line from the Jenkins instance? try to execute the following command from the Jenkins instance with the same user that you use to run Jenkins
su jenkins ssh USER@AGENT_HOST ls ssh -T USER@AGENT_HOST ls ssh -t USER@AGENT_HOST ls check the shell used by that user in /etc/passwd grep USER /etc/passwd Do you use a key with passphrase or user and password? Could you try with no host verification strategy? Could you check the settings in /etc/ssh/sshd_config agent file? grep -v -e "^#" -e "^$" /etc/ssh/sshd_config El viernes, 21 de diciembre de 2018, 17:20:26 (UTC+1), Philippe M. escribió: > > Hello, > > We are facing an issue using Jenkins 2.138.3 and connecting to certain > machines (issue occurs with machines in redhat 7.2, not in 6.4 but not > sure it's related). > > When we start the agent, we get this error, issue being that ssh gives > "stdin: > is not a tty" > > Full Jenkins log: > > SSHLauncher{host='XXX.XXX.X.XXX', port=22, > credentialsId='XXXXXXXXXXXXXXXXXXX', jvmOptions='', javaPath='', > prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, > maxNumRetries=10, retryWaitTime=15, > sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy, > > tcpNoDelay=true, trackCredentials=true} > > [12/21/18 16:41:19] [SSH] Opening SSH connection to XXX.XXX.X.XXX:22. > > [12/21/18 16:41:19] [SSH] SSH host key matches key in Known Hosts file. > Connection will be allowed. > > [12/21/18 16:41:19] [SSH] Authentication successful. > > SSH connection reports a garbage before a command execution. > > Check your .bashrc, .profile, and so on to make sure it is quiet. > > The received junk text is as follows: > > stdin: is not a tty > > > > null > > [12/21/18 16:41:20] Launch failed - cleaning up connection > [12/21/18 16:41:20] [SSH] Connection closed. > > > How can this be fixed, searching for similar issues, I see fixes related > to sudoers but we are not sudoing here. > I also found issue could be triggered by Banner , but there is no banner > either. > > Note that if we try non interactive mode, we have this which explains the > issue faced by Jenkins I guess: > > ssh -T login@host: > stty: standard input: Inappropriate ioctl for device > stdin: is not a tty > stdin: is not a tty > stdin: is not a tty > > > I tried to disable in /etc/profile stty if in non interactive mode, it > fixed : > > stty: standard input: Inappropriate ioctl for device > > So I now have: > > ssh -T login@host: > stdin: is not a tty > stdin: is not a tty > stdin: is not a tty > > But I am stuck here. > > Thanks in advance for your help. > Regards > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a6c8e87f-7355-4159-9393-08bcc84cec67%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.