sshMaxArg module
This module determines the maximum possible length of an SSH command.
It can also can run as a stand alone script. The solution is based on https://www.theeggeadventure.com/wikimedia/index.php/Ssh_argument_length
- sshMaxArg.probe_max_ssh_command_size(config, ssh_command_size=1048320, size_offset=1048320)[source]
Determine the maximum length of SSH commands for the current config
Try a SSH command with length
ssh_command_size
. The command is decreased bysize_offset
if it was too long or increased if it worked. The function calls itself recursively until it finds the maximum possible length. The offsetsize_offset
is bisect in each try.- Parameters:
config (config.Config) – Back In Time config instance including the details about the current SSH snapshot profile. The current profile must use the SSH mode.
ssh_command_size (int) – Initial length used for the test argument.
size_offset (int) – Offset for increase or decrease
ssh_command_size
.
- Returns:
The maximum possible SSH command length
- Return type:
(int)
- Raises: