-1

I am using Ubuntu 13.10 x86_64. I am not able to ssh over proxy to remote host.

When I issued:

ssh -vl hackep6t 162.251.80.25

I got this output:

OpenSSH_6.2p2 Ubuntu-6ubuntu0.1, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /home/rootkea/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Executing proxy command: exec nc -X connect -x 192.168.5.254:3128 162.251.80.25 22
debug1: permanently_drop_suid: 1000
debug1: identity file /home/rootkea/.ssh/id_rsa type -1
debug1: identity file /home/rootkea/.ssh/id_rsa-cert type -1
debug1: identity file /home/rootkea/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: identity file /home/rootkea/.ssh/id_dsa-cert type -1
debug1: identity file /home/rootkea/.ssh/id_ecdsa type -1
debug1: identity file /home/rootkea/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2p2 Ubuntu-6ubuntu0.1
nc: Proxy error: "HTTP/1.0 403 Forbidden"
ssh_exchange_identification: Connection closed by remote host 

Please help.

1
  • What do the logs on the server side say?
    – user143703
    Jan 31, 2014 at 19:59

1 Answer 1

0

You seem to be connecting through an HTTP proxy (squid on port 3128), but nc's default connection protocol is SOCKS5. I think you need to add -X connect to your ProxyCommand statement in ssh_config, to get nc to talk HTTP to your proxy. See man nc for details.

4
  • I added ProxyCommand nc -X connect -x 192.168.5.254:3128 %h %p in ~/.ssh/config. Now it says nc: Proxy error: "HTTP/1.0 403 Forbidden" instead of nc: read failed (0/3): Broken pipe with all other messages as they are.
    – rootkea
    Jan 31, 2014 at 20:24
  • That's progress; at least you're speaking HTTP to your proxy now. What do the squid logs say about why the request was denied? Jan 31, 2014 at 20:26
  • I am not an admin of squid. It's institute wide proxy sever set up by our institute web admin. So I don't have access to squid logs.
    – rootkea
    Jan 31, 2014 at 20:28
  • 2
    Anyway your connection to squid is being denied. You need help from the squid admins to get it to allow your connection. Jan 31, 2014 at 21:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .