V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ODD10
V2EX  ›  Oracle

Oracle 我用 Mac ssh 几秒就会断开,怎么回事?

  •  
  •   ODD10 · 2021-11-15 15:19:20 +08:00 · 1163 次点击
    这是一个创建于 864 天前的主题,其中的信息可能已经有所发展或是发生改变。
    用 Ios 上的 Termius 却不会。

    有知道怎么解决的,可以给个答案,或者相关链接。
    我搜了好些方法,都无效果。
    第 1 条附言  ·  2021-11-15 20:29:40 +08:00
    #	$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
    
    # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
    
    Include /etc/ssh/sshd_config.d/*.conf
    
    #Port 22
    #AddressFamily any
    #ListenAddress 0.0.0.0
    #ListenAddress ::
    
    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_ecdsa_key
    #HostKey /etc/ssh/ssh_host_ed25519_key
    
    # Ciphers and keying
    #RekeyLimit default none
    
    # Logging
    #SyslogFacility AUTH
    #LogLevel INFO
    
    # Authentication:
    
    #LoginGraceTime 2m
    #PermitRootLogin prohibit-password
    #StrictModes yes
    #MaxAuthTries 6
    #MaxSessions 10
    
    #PubkeyAuthentication yes
    
    #AuthorizedKeysFile	.ssh/authorized_keys .ssh/authorized_keys2
    
    #AuthorizedPrincipalsFile none
    
    #AuthorizedKeysCommand none
    #AuthorizedKeysCommandUser nobody
    
    #HostbasedAuthentication no
    # Change to yes if you don't trust ~/.ssh/known_hosts for
    # HostbasedAuthentication
    #IgnoreUserKnownHosts no
    # Don't read the user's ~/.rhosts and ~/.shosts files
    #IgnoreRhosts yes
    
    
    PasswordAuthentication no
    #PermitEmptyPasswords no
    
    
    ChallengeResponseAuthentication no
    
    # Kerberos options
    #KerberosAuthentication no
    #KerberosOrLocalPasswd yes
    #KerberosTicketCleanup yes
    #KerberosGetAFSToken no
    
    # GSSAPI options
    #GSSAPIAuthentication no
    #GSSAPICleanupCredentials yes
    #GSSAPIStrictAcceptorCheck yes
    #GSSAPIKeyExchange no
    
    UsePAM yes
    
    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #GatewayPorts no
    X11Forwarding yes
    #X11DisplayOffset 10
    #X11UseLocalhost yes
    #PermitTTY yes
    PrintMotd no
    #PrintLastLog yes
    TCPKeepAlive yes
    #PermitUserEnvironment no
    #Compression delayed
    ClientAliveInterval 30
    ClientAliveCountMax 3
    #UseDNS no
    #PidFile /var/run/sshd.pid
    #MaxStartups 10:30:100
    #PermitTunnel no
    #ChrootDirectory none
    #VersionAddendum none
    
    #Banner none
    
    AcceptEnv LANG LC_*
    
    Subsystem	sftp	/usr/lib/openssh/sftp-server
    
    #	X11Forwarding no
    #	AllowTcpForwarding no
    #	PermitTTY no
    #	ForceCommand cvs server
    
    第 2 条附言  ·  2021-11-15 21:09:43 +08:00
    有毒,surge 重启一下就不掉了
    5 条回复    2021-11-15 22:46:36 +08:00
    yaoliyc
        1
    yaoliyc  
       2021-11-15 16:54:12 +08:00
    设置 keepalive ?
    ik
        2
    ik  
       2021-11-15 20:13:28 +08:00 via iPhone
    心跳包
    ODD10
        3
    ODD10  
    OP
       2021-11-15 20:30:07 +08:00
    @yaoliyc #1
    @ik #2
    贴配置了
    skinny
        4
    skinny  
       2021-11-15 21:27:39 +08:00
    你得设置客户端,假如你用的是 ssh 命令,你得配置 ssh_config

    https://man.openbsd.org/ssh_config#ServerAliveInterval
    ODD10
        5
    ODD10  
    OP
       2021-11-15 22:46:36 +08:00
    @skinny #4
    与客户端无关,我连别的服务器都没这种现象。目前怀疑是 surge 或代理节点影响
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3260 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 11:51 · PVG 19:51 · LAX 04:51 · JFK 07:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.