### Apache Airflow Provider(s)

ssh

### Versions of Apache Airflow Providers

apache-airflow-providers-ssh 2.2.0

### Apache Airflow version

2.1.3

### Operating System

Ubuntu 20.04.2 LTS (Focal Fossa)

### Deployment

Other

### Deployment details

_No response_

### What happened

Specified `command` of SSHOperator to the return value of @task function, it raised AttributeError "'XComArg' object has no attribute 'startswith'".

- DAG
```python
from airflow.decorators import dag, task
from airflow.providers.ssh.operators.ssh import SSHOperator
from airflow.utils.dates import days_ago

DEFAULT_ARGS = {"owner": "airflow"}


# [START example_dag_decorator_ssh_usage]
@dag(default_args=DEFAULT_ARGS, schedule_interval=None, start_date=days_ago(2), tags=['example'])
def example_dag_decorator_ssh():

    @task
    def build_command() -> str:
        return 'whoami'

    command = build_command()

    SSHOperator(
        task_id='run_my_command',
        command=command,
        ssh_conn_id='default_conn',
        retries=0
    )


dag = example_dag_decorator_ssh()
# [END example_dag_decorator_ssh_usage]
```

- Test
```python
import os
import unittest
from glob import glob

from airflow.models import DagBag

ROOT_FOLDER = os.path.realpath(
    os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir)
)


class TestExampleDagDecoratorSsh(unittest.TestCase):
    def test_should_be_importable(self):
        dagbag = DagBag(
            dag_folder=f"{ROOT_FOLDER}/airflow/example_dags",
            include_examples=False,
        )
        assert 0 == len(dagbag.import_errors), f"import_errors={str(dagbag.import_errors)}"

```

- Result
```
------------------------------------------------------------------------------------------ Captured log call ------------------------------------------------------------------------------------------
INFO     airflow.models.dagbag.DagBag:dagbag.py:496 Filling up the DagBag from /home/masayuki/git/airflow/airflow/example_dags
ERROR    airflow.models.dagbag.DagBag:dagbag.py:329 Failed to import: /home/masayuki/git/airflow/airflow/example_dags/example_dag_decorator_ssh.py
Traceback (most recent call last):
  File "/home/masayuki/git/airflow/airflow/models/dagbag.py", line 326, in _load_modules_from_file
    loader.exec_module(new_module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/masayuki/git/airflow/airflow/example_dags/example_dag_decorator_ssh.py", line 26, in <module>
    dag = example_dag_decorator_ssh()
  File "/home/masayuki/git/airflow/airflow/models/dag.py", line 2351, in factory
    f(**f_kwargs)
  File "/home/masayuki/git/airflow/airflow/example_dags/example_dag_decorator_ssh.py", line 18, in example_dag_decorator_ssh
    SSHOperator(
  File "/home/masayuki/git/airflow/airflow/models/baseoperator.py", line 178, in apply_defaults
    result = func(self, *args, **kwargs)
  File "/home/masayuki/git/airflow/airflow/providers/ssh/operators/ssh.py", line 81, in __init__
    self.get_pty = (self.command.startswith('sudo') or get_pty) if self.command else get_pty
AttributeError: 'XComArg' object has no attribute 'startswith'
```

### What you expected to happen

No error

### How to reproduce

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

tests/providers/ssh/operators/test_ssh.py
from airflow.providers.ssh.hooks.ssh import SSHHook
        hook = SSHHook(ssh_conn_id='ssh_default')
        hook.no_host_key_check = True
        self.dag = DAG('ssh_test', default_args={'start_date': DEFAULT_DATE})
        self.hook = hook
    def test_hook_created_correctly_with_timeout(self):
        timeout = 20
        ssh_id = "ssh_default"
        with self.dag:
            task = SSHOperator(task_id="test", command=COMMAND, timeout=timeout, ssh_conn_id="ssh_default")
        task.execute(None)
        assert timeout == task.ssh_hook.conn_timeout
        assert ssh_id == task.ssh_hook.ssh_conn_id
    def test_hook_created_correctly(self):
        conn_timeout = 20
        cmd_timeout = 45
        ssh_id = 'ssh_default'
        with self.dag:
            task = SSHOperator(
                task_id="test",
                command=COMMAND,
                conn_timeout=conn_timeout,
                cmd_timeout=cmd_timeout,
                ssh_conn_id="ssh_default",
            )
        task.execute(None)
        assert conn_timeout == task.ssh_hook.conn_timeout
        assert ssh_id == task.ssh_hook.ssh_conn_id
    @conf_vars({('core', 'enable_xcom_pickling'): 'False'})
    def test_json_command_execution(self, create_task_instance_of_operator):