mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
p2v: Send ping packets every 5 minutes to sshd.
Also drop the connection if no response at all has been received after 30 minutes. This action should prevent firewall timeouts from causing virt-p2v to fail (see this thread: https://www.redhat.com/archives/libguestfs/2017-February/msg00010.html). Thanks: Tomáš Golembiovský
This commit is contained in:
@@ -354,6 +354,10 @@ start_ssh (unsigned spawn_flags, struct config *config,
|
||||
snprintf (connect_timeout_str, sizeof connect_timeout_str,
|
||||
"ConnectTimeout=%d", SSH_TIMEOUT);
|
||||
ADD_ARG (argv, i, connect_timeout_str);
|
||||
ADD_ARG (argv, i, "-o"); /* Send ping packets every 5 mins to sshd. */
|
||||
ADD_ARG (argv, i, "ServerAliveInterval=300");
|
||||
ADD_ARG (argv, i, "-o");
|
||||
ADD_ARG (argv, i, "ServerAliveCountMax=6");
|
||||
if (using_password_auth) {
|
||||
/* Only use password authentication. */
|
||||
ADD_ARG (argv, i, "-o");
|
||||
|
||||
Reference in New Issue
Block a user