Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SFTP connection timeout issue


I have configured the pipeline as below.


- pipe: atlassian/sftp-deploy:0.5.7
USER: 'oracle'
REMOTE_PATH: "/home/oracle/testDeploy"
LOCAL_PATH: '$BITBUCKET_CLONE_DIR/release_package/*'
PASSWORD: 'xxxxxx'
DEBUG: 'true'
EXTRA_ARGS: '-P 2232'
#EXTRA_ARGS: ["-P", "2232"]

I am able to SFTP using winscp to the host with password


Please find the logs below.

--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \ --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \ --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \ --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \ --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \ --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \ --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \ --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \ --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \ --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \ --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \ --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \ --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \ --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \ --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \ --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \ --env=DOCKER_HOST="tcp://host.docker.internal:2375" \ --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \ --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/sftp-deploy" \ --env=DEBUG="true" \ --env=EXTRA_ARGS="-P 2232" \ --env=LOCAL_PATH="$BITBUCKET_CLONE_DIR/release_package/*" \ --env=PASSWORD="" \ --env=REMOTE_PATH="/home/oracle/testDeploy" \ --env=SERVER="" \ --env=USER="oracle" \ --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \ bitbucketpipelines/sftp-deploy:0.5.7Unable to find image 'bitbucketpipelines/sftp-deploy:0.5.7' locally0.5.7: Pulling from bitbucketpipelines/sftp-deploy31603596830f: Pulling fs layer5223754e1462: Pulling fs layere082d8591f92: Pulling fs layer11c53ae80555: Pulling fs layer3dc58ede5d22: Pulling fs layer3dc58ede5d22: Waiting11c53ae80555: Waitinge082d8591f92: Verifying Checksume082d8591f92: Download complete31603596830f: Verifying Checksum31603596830f: Download complete5223754e1462: Verifying Checksum5223754e1462: Download complete11c53ae80555: Verifying Checksum11c53ae80555: Download complete31603596830f: Pull complete3dc58ede5d22: Verifying Checksum3dc58ede5d22: Download complete5223754e1462: Pull completee082d8591f92: Pull complete11c53ae80555: Pull complete3dc58ede5d22: Pull completeDigest: sha256:4767af0e7706ae28565f2903e28a7747e098284eb0b6324430ada075469c4023Status: Downloaded newer image for bitbucketpipelines/sftp-deploy:0.5.7+ SFTP_DEBUG_ARGS=-v+ [[ -z  ]]+ info 'Using PASSWORD.'INFO: Enabling debug mode.INFO: Using PASSWORD.+ echo -e '\e[36mINFO: Using PASSWORD.\e[0m'+ setup_ssh_dir+ INJECTED_SSH_CONFIG_DIR=/opt/atlassian/pipelines/agent/ssh+ IDENTITY_FILE=/opt/atlassian/pipelines/agent/ssh/id_rsa_tmp+ KNOWN_HOSTS_FILE=/opt/atlassian/pipelines/agent/ssh/known_hosts+ mkdir -p /root/.ssh+ touch /root/.ssh/authorized_keys+ [[ -z ]]+ '[' '!' -f /opt/atlassian/pipelines/agent/ssh/known_hosts ']'+ cat /opt/atlassian/pipelines/agent/ssh/known_hosts+ '[' -f /root/.ssh/config ']'+ [[ -z  ]]+ chmod -R go-rwx /root/.ssh/+ run_pipe+ info 'Starting SFTP deployment to'+ echo -e '\e[36mINFO: Starting SFTP deployment to\e[0m'+ set +e+ [[ -z 3 ]]INFO: Starting SFTP deployment to debug Executing echo '"mput' '/opt/atlassian/pipelines/agent/build/release_package/*"' '|' sshpass -p ######@123 sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@ [[ true == \t\r\u\e ]]+ echo -e '\e[37mDEBUG: Executing echo "mput /opt/atlassian/pipelines/agent/build/release_package/*" | sshpass -p  sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@\e[0m'DEBUG: Executing echo "mput /opt/atlassian/pipelines/agent/build/release_package/*" | sshpass -p #######@123 sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@ echo 'mput /opt/atlassian/pipelines/agent/build/release_package/*'+ sshpass -p  sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@, OpenSSL 1.1.1g 21 Apr 2020debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to [] port 2232.debug1: connect to address port 2232: Operation timed outssh: connect to host port 2232: Operation timed outConnection closed+ STATUS=255+ set -e




2 answers

1 accepted

0 votes
Answer accepted

Hi @Rahul Johny ,

Thank you for your question!

Please, try to avoid post debugged output with your sensitive data.
We're highly recommend to change your service password as soon as possible.

Is provided port 2232 accessible?

yes its accessible. when connecting via WinSCP

@Oleksandr Kyrdan  yes the port is accessible

Connection timed out. Perhaps the remote system is not reachable? For example behind a Firewall?

What are the IP addresses to configure a corporate firewall? 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,440 views 4 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you