ERROR: Job failed: exit code 1 after ssh

Hello,

I have a problem with Gitlab runner, when the Gitlab runner is running through the job , faced with the issue after ssh to the server (there are no any problems with ssh on CentOS), then the process is failed with this error:

ERROR: Job failed: exit status 1

Also, I have trace the gitlab-runner logs and there are no any issue.

The environment tools are:

Gitlab CE - CentOS7

The gitlab-ci.yml:

stages:
  - launch

deploy:
  stage: launch
  before_script:
    - 'which ssh-agent'
    - eval $(ssh-agent -s)
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
  script:
    - ssh user@ipAddress
  only:
    - dev

The screenshot of issue:

error

Thank you for any help.

Edited by Mahdieh