jenkins配置linux(centos7) slave节点,ssh连接后报错 Check your .bashrc, .profile, and so on to make sure it is

报错信息如下

[11/09/20 16:54:21] [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:
  setterm: $TERM is not defined.  null 
  
[11/09/20 16:54:21] Launch failed - cleaning up connection [11/09/20 16:54:21] [SSH] Connection closed. Connection refused (Connection refused)

 ERROR: Connection is not established! java.lang.IllegalStateException: Connection is not established! 	at com.trilead.ssh2.Connection.getRemainingAuthMethods(Connection.java:988) 	at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator.canAuthenticate(TrileadSSHPasswordAuthenticator.java:82) 	at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:218) 	at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:171) 	at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:863) 	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:435) 	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:422) 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 	at java.base/java.lang.Thread.run(Thread.java:834)

解决办法

注释掉/root/.bashrc 中color=setterm -blength 0 一行内容即可

具体如下:

[root@jenkins_slave1 ~]# vim /root/.bashrc 
      1 # .bashrc
      2 
      3 # User specific aliases and functions
      4 
      5 alias rm='rm -i'
      6 alias cp='cp -i'
      7 alias mv='mv -i'
      8 
      9 # Source global definitions
     10 if [ -f /etc/bashrc ]; then
     11     . /etc/bashrc
     12 fi
     13 #setterm -blength 0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值