protected function unifyMultiserversDeclarations($connection)
    {
        $connection = (array) $connection;
        foreach ($connection as $key => $servers) {
            $servers = Arr::get($servers, 'servers', [$servers]);
            $servers = array_values($servers);
            foreach ($servers as &$server) {
                if (array_key_exists('key', $server)) {
                    $server['key'] = str_replace('~/', $this->paths->getUserHomeFolder().'/', $server['key']);
                }
            }

            $connection[$key] = ['servers' => $servers];
        }

        return $connection;
    }