Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_B_Intel
Employee
197 Views

SSH Proxy

Jump to solution

From within my corporate firewall, I usually have to set up SSH with `ProxyCommand nc -X 5 -x [proxy host]:[proxy port] %h %p`. I noticed that the instructions for https://devcloud.intel.com/datacenter/learn/connect-with-ssh-linux-macos/ require proxying through a non-TTY SSH connection. How can I do both?

I currently have in ~/.ssh/config:

Host devcloud
        User guest
        Hostname devcloud.intel.com
        IdentityFile ~/.ssh/devcloud-access-key-[user ID].txt
        RequestTTY no
        ProxyCommand nc -X 5 -x [proxy host]:[proxy port] %h %p

Unfortunately, when I try to login the connection succeeds but stalls after emitting some SSH handshake info:

$ ssh devcloud
SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3

Tags (1)
0 Kudos
1 Solution
Adweidh_Intel
Moderator
197 Views

Thanks for reaching out to us. 

Kindly configure ~/.ssh/config as below : 

Host devcloud
User [user ID]
HostName c009
Port [proxy port]
IdentityFile ~/.ssh/devcloud-access-key-[user ID].txt
ProxyCommand ssh -T devcloud-socks-proxy

Host devcloud-socks-proxy
User guest
Hostname devcloud.intel.com
IdentityFile "~/.ssh/devcloud-access-key-[user ID].txt"
LocalForward [proxy port] colfaxserver:22
ProxyCommand nc -x [proxy host] %h %p

 

Hope this works fine !! 

View solution in original post

3 Replies
Adweidh_Intel
Moderator
198 Views

Thanks for reaching out to us. 

Kindly configure ~/.ssh/config as below : 

Host devcloud
User [user ID]
HostName c009
Port [proxy port]
IdentityFile ~/.ssh/devcloud-access-key-[user ID].txt
ProxyCommand ssh -T devcloud-socks-proxy

Host devcloud-socks-proxy
User guest
Hostname devcloud.intel.com
IdentityFile "~/.ssh/devcloud-access-key-[user ID].txt"
LocalForward [proxy port] colfaxserver:22
ProxyCommand nc -x [proxy host] %h %p

 

Hope this works fine !! 

View solution in original post

Andrew_B_Intel
Employee
197 Views

That worked, thanks!

Adweidh_Intel
Moderator
197 Views

Glad to hear that your issue got fixed !!

We are closing this thread. In case of any further queries kindly open a new thread. 

Reply