저는 Window 7 컴퓨터를 사용하고 있으므로 WinSCP와 같은 도구를 사용하여 Ubuntu를 실행하는 원격 서버를 관리해야 합니다.
나는 좋은 오래된 명령줄도 사용하지만 파일 관리를 위해 일반적으로 WinSCP를 사용합니다. FTP 클라이언트처럼 작동하는 멋진 도구이지만 대신 SSH 또는 SFTP를 사용한다고 생각합니다.
이제 정말 짜증나고 속도가 느려지는 문제는 10~20분(실제 시간은 잘 모르겠습니다) 동안 유휴 상태로 앉아 WinSCP를 통해 파일을 전송하려고 할 때 다시 연결해야 하는 경우입니다. 매우 빠릅니다. 프로세스를 진행하고 비밀번호나 키 파일을 다시 묻지 않습니다. 하지만 시간이 초과되거나 특정 지점까지 연결이 끊어지는 것 같습니다... 다시 연결하는 것처럼 연결이 실제로 끊어졌는지 아닌지 잘 모르겠습니다. 바로 실행되지만 15~30초 정도 걸리므로 짜증납니다.
마치 항상 연결한 것처럼 항상 빠르고 원활하게 작동하고 잠시 유휴 상태일 때처럼 시간 초과가 발생하지 않도록 하는 방법을 찾고 싶습니다.
그래서 저는 이것이 WinSCP의 설정이나 문제일까요, 아니면 내 서버의 설정이라고 생각할까요?
항상 다시 연결하지 않고 로그온 상태를 유지하는 시간을 연장하는 방법에 대한 아이디어가 있습니까?
SSH 구성 파일을 찾을 수 있는 곳을 보았기 때문에 아래 내용 sshd_config
에서 이 파일을 찾았습니다 etc/ssh/sshd_config
. 눈에 띄는 내용은 없습니다(별로 말하지 않음)...
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
답변1
시스템과 원격 시스템 사이에 15/20분 후에 연결에 대한 상태 데이터가 시간 초과되는 상태 저장 방화벽/nat가 있을 가능성이 높습니다. 클라이언트에서 연결 유지 설정을 수정합니다. 제가 일반적으로 사용하는 값은 120초입니다.
문제를 일으키는 방화벽/NAT 장치를 수정하는 것도 가능하지만 다른 부작용이 있을 수 있습니다.
다음 대화 상자를 엽니다.세션/사이트/사이트 관리자: