Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Commands/Remote/SSHBaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ private function getCommandSummary($command_args)
*/
private function getConnectionString()
{
$sftp = $this->environment->sftpConnectionInfo();
$ssh = $this->environment->sshConnectionInfo();
$command = $this->getConfig()->get('ssh_command');
if ($this->output()->isDebug()) {
$command .= ' -vvv';
Expand All @@ -387,7 +387,7 @@ private function getConnectionString()
}
return vsprintf(
'%s -T %s@%s -p %s -o "StrictHostKeyChecking=no" -o "AddressFamily inet"',
[$command, $sftp['username'], $this->lookupHostViaAlternateNameserver($sftp['host']), $sftp['port']]
[$command, $ssh['username'], $this->lookupHostViaAlternateNameserver($ssh['host']), $ssh['port']]
);
}

Expand Down
14 changes: 11 additions & 3 deletions src/Models/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -985,16 +985,24 @@ public function setHttpsCertificate($certificate = [])
}

/**
* Gives SFTP connection info for this environment
*
* @return array
* Gives sftp connection info for this environment.
*/
public function sftpConnectionInfo()
{
if ($this->isEvcsSite()) {
// No SFTP for EVCS sites
return [];
}
return $this->sshConnectionInfo();
}

/**
* Gives ssh connection info for this environment
*
* @return array
*/
public function sshConnectionInfo()
{
$site = $this->getSite();
if (!empty($ssh_host = $this->getConfig()->get('ssh_host'))) {
$username = "appserver.{$this->id}.{$site->id}";
Expand Down
Loading