免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 7521 | 回复: 30
打印 上一主题 下一主题

[网络管理] 请教:用ssh登录RH Linux AS3空闲后自动断开 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-01-09 14:35 |只看该作者 |倒序浏览
安装RH Linux AS3以后,用ssh登录后,一段时间空闲不操作的时候,就会自动断开,不知道是什么原因,有没有办法设置,请指教。谢谢。

好像RH8没有这个问题。

论坛徽章:
0
2 [报告]
发表于 2004-01-09 15:28 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

这个是很基本的安全设置。
你看一下$HOME/.bash_profile或是.bashrc,看看是不是有TMOUT=...的设置。

论坛徽章:
0
3 [报告]
发表于 2004-01-09 15:41 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

  1. [root@MyServer root]# cat .bash_profile
  2. # .bash_profile

  3. # Get the aliases and functions
  4. if [ -f ~/.bashrc ]; then
  5.         . ~/.bashrc
  6. fi

  7. # User specific environment and startup programs

  8. PATH=$PATH:$HOME/bin
  9. BASH_ENV=$HOME/.bashrc
  10. USERNAME="root"

  11. export USERNAME BASH_ENV PATH
复制代码

论坛徽章:
0
4 [报告]
发表于 2004-01-09 15:43 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

  1. [root@MyServer root]# cat .bashrc
  2. # .bashrc

  3. # User specific aliases and functions

  4. alias rm='rm -i'
  5. alias cp='cp -i'
  6. alias mv='mv -i'

  7. # Source global definitions
  8. if [ -f /etc/bashrc ]; then
  9.         . /etc/bashrc
  10. fi
复制代码

论坛徽章:
0
5 [报告]
发表于 2004-01-09 15:51 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

没有发现!!

论坛徽章:
0
6 [报告]
发表于 2004-01-09 15:54 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

use this command:
bash-2.05a$ env | grep -i tmout

论坛徽章:
0
7 [报告]
发表于 2004-01-09 16:00 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

原帖由 "webcraft" 发表:
use this command:
bash-2.05a$ env | grep -i tmout


谢谢,执行后没任何显示。

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
8 [报告]
发表于 2004-01-09 16:05 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

vi /etc/ssh/sshd_config 看看。

好象叫什么 ClientAliveInterval。我是在rh9上看到的。

论坛徽章:
0
9 [报告]
发表于 2004-01-09 16:20 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

  1. # cat sshd_config

  2. #       $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $

  3. # This is the sshd server system-wide configuration file.  See
  4. # sshd_config(5) for more information.

  5. # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

  6. # The strategy used for options in the default sshd_config shipped with
  7. # OpenSSH is to specify options with their default value where
  8. # possible, but leave them commented.  Uncommented options change a
  9. # default value.

  10. #Port 22
  11. #Protocol 2,1
  12. #ListenAddress 0.0.0.0
  13. #ListenAddress ::

  14. # HostKey for protocol version 1
  15. #HostKey /etc/ssh/ssh_host_key
  16. # HostKeys for protocol version 2
  17. #HostKey /etc/ssh/ssh_host_rsa_key
  18. #HostKey /etc/ssh/ssh_host_dsa_key

  19. # Lifetime and size of ephemeral version 1 server key
  20. #KeyRegenerationInterval 3600
  21. #ServerKeyBits 768

  22. # Logging
  23. #obsoletes QuietMode and FascistLogging
  24. #SyslogFacility AUTH
  25. SyslogFacility AUTHPRIV
  26. #LogLevel INFO

  27. # Authentication:

  28. #LoginGraceTime 120
  29. #PermitRootLogin yes
  30. #StrictModes yes

  31. #RSAAuthentication yes
  32. #PubkeyAuthentication yes
  33. #AuthorizedKeysFile     .ssh/authorized_keys

  34. # rhosts authentication should not be used
  35. #RhostsAuthentication no
  36. # Don't read the user's ~/.rhosts and ~/.shosts files
  37. #IgnoreRhosts yes
  38. # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
  39. #RhostsRSAAuthentication no
  40. # similar for protocol version 2
  41. #HostbasedAuthentication no
  42. # Change to yes if you don't trust ~/.ssh/known_hosts for
  43. # RhostsRSAAuthentication and HostbasedAuthentication
  44. #IgnoreUserKnownHosts no

  45. # To disable tunneled clear text passwords, change to no here!
  46. #PasswordAuthentication yes
  47. #PermitEmptyPasswords no

  48. # Change to no to disable s/key passwords
  49. #ChallengeResponseAuthentication yes

  50. # Kerberos options
  51. #KerberosAuthentication no
  52. #KerberosOrLocalPasswd yes
  53. #KerberosTicketCleanup yes

  54. #AFSTokenPassing no

  55. # Kerberos TGT Passing only works with the AFS kaserver
  56. #KerberosTgtPassing no

  57. # Set this to 'yes' to enable PAM keyboard-interactive authentication
  58. # Warning: enabling this may bypass the setting of 'PasswordAuthentication'
  59. #PAMAuthenticationViaKbdInt no

  60. #X11Forwarding no
  61. X11Forwarding yes
  62. #X11DisplayOffset 10
  63. #X11UseLocalhost yes
  64. #PrintMotd yes
  65. #PrintLastLog yes
  66. #KeepAlive yes
  67. #UseLogin no
  68. #UsePrivilegeSeparation yes
  69. #PermitUserEnvironment no
  70. #Compression yes

  71. #MaxStartups 10
  72. # no default banner path
  73. #Banner /some/path
  74. #VerifyReverseMapping no

  75. # override default of no subsystems
  76. Subsystem       sftp    /usr/libexec/openssh/sftp-server
复制代码


好像没有类似的设置。

ssh一会就退出,是件挺痛苦的事.....

论坛徽章:
0
10 [报告]
发表于 2004-01-10 00:07 |只看该作者

请教:用ssh登录RH Linux AS3空闲后自动断开

继续追问中。。。。顶
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP