fix(ssh): scp requires square brackets for ipv6 (#6001)
This commit is contained in:
parent
221b82cf06
commit
8fa0409a37
1 changed files with 5 additions and 1 deletions
|
|
@ -103,7 +103,11 @@ public static function generateScpCommand(Server $server, string $source, string
|
|||
}
|
||||
|
||||
$scp_command .= self::getCommonSshOptions($server, $sshKeyLocation, config('constants.ssh.connection_timeout'), config('constants.ssh.server_interval'), isScp: true);
|
||||
$scp_command .= "{$source} {$server->user}@{$server->ip}:{$dest}";
|
||||
if ($server->isIpv6()) {
|
||||
$scp_command .= "{$source} {$server->user}@[{$server->ip}]:{$dest}";
|
||||
} else {
|
||||
$scp_command .= "{$source} {$server->user}@{$server->ip}:{$dest}";
|
||||
}
|
||||
|
||||
return $scp_command;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue