WinSCPはUbuntuサーバーに頻繁に再接続する必要がある

WinSCPはUbuntuサーバーに頻繁に再接続する必要がある

私は Windows 7 マシンを使用しているため、Ubuntu を実行するリモート サーバーを管理するには WinSCP などのツールを使用する必要があります。

私も古き良きコマンドラインを使用していますが、ファイル管理には通常 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

おそらく、システムとリモート システムの間にステートフル ファイアウォール/NAT があり、15/20 分後に接続の状態データがタイムアウトしている可能性があります。クライアントのキープアライブ設定を変更します。通常、120 秒の値を使用します。

問題の原因となっているファイアウォール/NAT デバイスを変更することも可能ですが、他の副作用が生じる可能性があります。

次のダイアログを開きますセッション/サイト/サイトマネージャー:

winscp キープアライブ

関連情報