fix: ipv6 scp should use -6 flag
This commit is contained in:
parent
73e38ff951
commit
4d86b556a4
2 changed files with 8 additions and 1 deletions
|
|
@ -94,7 +94,9 @@ public static function generateScpCommand(Server $server, string $source, string
|
|||
$muxPersistTime = config('constants.ssh.mux_persist_time');
|
||||
|
||||
$scp_command = "timeout $timeout scp ";
|
||||
|
||||
if ($server->isIpv6()) {
|
||||
$scp_command .= '-6 ';
|
||||
}
|
||||
if (self::isMultiplexingEnabled()) {
|
||||
$scp_command .= "-o ControlMaster=auto -o ControlPath=$muxSocket -o ControlPersist={$muxPersistTime} ";
|
||||
self::ensureMultiplexedConnection($server);
|
||||
|
|
|
|||
|
|
@ -1221,4 +1221,9 @@ public function storageCheck(): ?string
|
|||
|
||||
return instant_remote_process($commands, $this, false);
|
||||
}
|
||||
|
||||
public function isIpv6(): bool
|
||||
{
|
||||
return str($this->ip)->contains(':');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue