Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

SCP deploy failing port 22: Operation timed out 64 lost connection

image: node:10.15.3

pipelines:
branches:
main:
- step:
name: Deploy artifacts using SCP to PROD
deployment: prod
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
SSH_KEY: $SSH_KEY
REMOTE_PATH: '/var/www/html'
LOCAL_PATH: 'html/*'


Below is the error:
########################

pipe: atlassian/scp-deploy:0.3.3
2m 11s
1
+ docker container run \
2
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
3
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
4
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
5
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
6
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/scp-deploy:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/scp-deploy \
7
--workdir=$(pwd) \
8
--label=org.bitbucket.pipelines.system=true \
9
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
10
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
11
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
12
--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
13
--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
14
--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
15
--env=BITBUCKET_DEPLOYMENT_ENVIRONMENT_UUID="$BITBUCKET_DEPLOYMENT_ENVIRONMENT_UUID" \
16
--env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
17
--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
18
--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
19
--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
20
--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
21
--env=BITBUCKET_DEPLOYMENT_ENVIRONMENT="$BITBUCKET_DEPLOYMENT_ENVIRONMENT" \
22
--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
23
--env=CI="$CI" \
24
--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
25
--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
26
--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
27
--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
28
--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
29
--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
30
--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
31
--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
32
--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
33
--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
34
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
35
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
36
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/scp-deploy" \
37
--env=LOCAL_PATH="html/*" \
38
--env=REMOTE_PATH="/var/www/html" \
39
--env=SERVER="$SERVER" \
40
--env=SSH_KEY="$SSH_KEY" \
41
--env=USER="$USER" \
42
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
43
bitbucketpipelines/scp-deploy:0.3.3
44
Unable to find image 'bitbucketpipelines/scp-deploy:0.3.3' locally
45
0.3.3: Pulling from bitbucketpipelines/scp-deploy
46
c87736221ed0: Pulling fs layer
47
aca9d7420f98: Pulling fs layer
48
0f3ac11eee9e: Pulling fs layer
49
0f3ac11eee9e: Verifying Checksum
50
0f3ac11eee9e: Download complete
51
c87736221ed0: Verifying Checksum
52
c87736221ed0: Download complete
53
c87736221ed0: Pull complete
54
aca9d7420f98: Verifying Checksum
55
aca9d7420f98: Download complete
56
aca9d7420f98: Pull complete
57
0f3ac11eee9e: Pull complete
58
Digest: sha256:92cc16bb0a383f038bdc2443d0ea83dc390aa2f19beb0f56bf3c77ffff78ef41
59
Status: Downloaded newer image for bitbucketpipelines/scp-deploy:0.3.3
60
INFO: Starting SCP deployment to ec2-35-92-201-11.us-west-2.compute.amazonaws.com:/var/www/html...
61
scp -rp -i /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp html/index.html html/paloalto-whitelists ubuntu@ec2-35-92-201-11.us-west-2.compute.amazonaws.com:/var/www/html
62
Warning: Identity file /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp not accessible: No such file or directory.
63
ssh: connect to host ec2-35-92-201-11.us-west-2.compute.amazonaws.com port 22: Operation timed out
64
lost connection
65
✖ Deployment failed.

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 15, 2023

Hi Sai,

I have executed a telnet connection test command against that remote URL on both port 22 and port 80 and both have failed, this would imply that there is some kind of firewall blocking incoming connections or that the URL is incorrect.

Please review the URL that you are attempting to connect to, and if it is correct - please proceed with whitelisting the IP addresses found in our firewall documentation below:

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events