<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>login on heran blog</title>
    <link>/tags/login/</link>
    <description>Recent content in login on heran blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 08 May 2023 00:00:00 +0000</lastBuildDate><atom:link href="/tags/login/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ssh登陆闪退问题排查</title>
      <link>/notes/ssh_login_failed/</link>
      <pubDate>Mon, 08 May 2023 00:00:00 +0000</pubDate>
      
      <guid>/notes/ssh_login_failed/</guid>
      <description>ssh登陆问题排查 ssh登陆闪退，并非密码不对。如果密码不对会有明确报错。ssh闪退在ssh ip -vvvv 输出中能明确看到输入密码后登陆已经成功。
1. ssh 登录过程 ssh 登录到一台机器加载shell的时候会调用/etc/profile.d/目录下的脚本，如果有问题会退出。看到的现象是先登陆进去然后退出。所以脚本不要乱放进/etc/profile.d/目录下，放进去也要确保能正常执行的。
用户登录的时候执行sh脚本的顺序： /etc/profile.d/file /etc/profile /etc/bashrc /mingjie/.bashrc /mingjie/.bash_profile
2. nofile太小（修改测试环境ulimit） /etc/security/limits.conf
/etc/security/limits.d/80-nofile.conf 这两个文件，其中一个这样设置下就行：
soft nofile 131072 hard nofile 131072 如果修改不生效，改一下/etc/ssh/sshd_config的UseLogin no为UseLogin yes，然后重启sshd（sudo service sshd restart）。 参考如下链接： https://blog.csdn.net/jiajiren11/article/details/78378664 https://blog.csdn.net/fycghy0803/article/details/79708724
3. 目标机器磁盘空间满了 </description>
    </item>
    
  </channel>
</rss>
