# SSH deploy with an SSH tunnel

**URL:** <https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808>\
**Category:** Deployments\
**Created:** [May 4, 2016, 6:21pm UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808 "2016-05-04T18:21:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![edimoldovan](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/edimoldovan/32/1017_2.png) [@edimoldovan](https://discuss.circleci.com/u/edimoldovan)\
**Post date:** [May 4, 2016, 6:21pm UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808/1 "2016-05-04T18:21:55Z")

</div>

Hi there,

Hope you’re all great. Having made and working a product like CircleCI should make you feel awesome!

My question: we use a SSH tunnel like this  
ssh -t \< user \>@\< ip \> -p \< a-port \> ssh \< host \> -p\< other-port \>

How can we set up a SSH deploy with a custom deploy script with such a SSH connection? Is that possible?

Thanks,  
ed

---

<div class="post-metadata">

**Author:** ![fadiabdeen](https://avatars.discourse-cdn.com/v4/letter/f/aca169/32.png) [@fadiabdeen](https://discuss.circleci.com/u/fadiabdeen)\
**Post date:** [June 6, 2016, 4:43pm UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808/2 "2016-06-06T16:43:52Z")

</div>

> [@edimoldovan](#):
>
> pe you’re all great. Having made and working a product like CircleCI should make you feel awesome!

Hey man, was you able to figure it out ? i found the SSH Permission and tried in different ways and its not working for me

---

<div class="post-metadata">

**Author:** ![edimoldovan](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/edimoldovan/32/1017_2.png) [@edimoldovan](https://discuss.circleci.com/u/edimoldovan)\
**Post date:** [June 6, 2016, 5:06pm UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808/3 "2016-06-06T17:06:01Z")

</div>

Hey @fadiabdeen  
Not really, I didn’t. Gave up after a while and built up another solution.

---

<div class="post-metadata">

**Author:** ![fadiabdeen](https://avatars.discourse-cdn.com/v4/letter/f/aca169/32.png) [@fadiabdeen](https://discuss.circleci.com/u/fadiabdeen)\
**Post date:** [June 6, 2016, 5:10pm UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808/4 "2016-06-06T17:10:32Z")

</div>

I’m basically generating a new private/public keys, i put the private in the SSH Permissions section and the public in the authorized\_keys in the server . but still popping for a password and timeout . I hope someone have figure out the problem can help , i don’t want to implement a workaround if this can work. , hopefully someone is able to help

---

<div class="post-metadata">

**Author:** ![thegregthomp](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/thegregthomp/32/13262_2.png) [@thegregthomp](https://discuss.circleci.com/u/thegregthomp)\
**Post date:** [June 14, 2016, 6:41pm UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808/5 "2016-06-14T18:41:49Z")

</div>

Has anyone figured this out? I’m trying to do something similar, SSH in to another server a execute a git pull but I have endless issues with my keys. I’ve tried using the ssh config, using the straight key files, everything and it always asks for my password.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/ssh-deploy-with-an-ssh-tunnel/3808/6 "2018-06-18T11:41:01Z")

</div>


