首页 > 服务器 > Web服务器 > 正文

putty network error:Connection refused 乱码

2019-10-13 18:36:41
字体:
来源:转载
供稿:网友

问题:
  使用putty登录显示network error:Connection refused使用putty登录显示network error:Connection refused
  在局域网使用putty登录显示network error:Connection refused

解决方法:
  1.gedit /etc/ssh/sshd_config    将PermitRootLogin的注释取消,或者将no改为yes。(如果没有sshd_config文件说明linux上没有安装SSH,使用sudo apt-get install ssh安装之后,sshd-config文件中PermitRootLogin选项默认的是yes,新安装的ssh不用操作下面两部)
  2.service sshd restart
  3.setup命令进入将防火墙关闭。 

 

问题:
  使用putty登陆之后显示乱码

解决方法:
  其实只需要一步即可: 在window-〉Translation中,character set 中,把Use font encoding改为UTF-8,其他不需要改动(按照方法一改动之后可能大写字母显示会编程乱码)。
  ###方法一:
  打开putty主程序,选择window-〉Appearance-〉Font settings-〉Change Settings,选择Fixedsys字体,字符集选择CHINESE_GB2312。在window-〉Appearance-〉 Translation中,Received data assumed to be in which character set 中,把Use font encoding改为UTF-8如果经常使用,把这些设置保存在session里面。
  保存方法:再做完以上操作的同时选中以下两项:
  在window-〉Appearance-〉 Translation中,选中:TReat CJK ambiguous characters as wide和Caps Lock acts as Cyrillic switch即可。 
 

  ###方法二:
  编辑/etc/sysconfig/i18n
  把第1句“LANG=”zh_CN.UTF-8″”改为“LANG=”zh_CN.GB18030″”,完成后保存重新登录即可。

  ##方法三:
  打开putty,登录成功后,在shell中输入
  # export LC_ALL= ‘zh_CN.utf8′
  # vi ~/.bash_profile
  LANG=zh_CN.GB18030
  LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
  export LANG LANGUAGE 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表