I have a situation at work

we have a firewall between 2 networks

to minimize interfence they've only opened port 22.

I can ssh to a box running sshd, but scp hangs....
and X11Forwarding doesn't work either.

you type xterm or xeyes or xcalc or whatever after logging in and it just hangs

I'm assuming it is a firewall issue, but what ports do you need to open? I thought ssh tunneled everything on port22 ?


Re: sshd

Right, but in addition to ForwardX11 yes, you need XAUTH configured properly. Otherwise, you can use -Y and fake the XAUTH stuff which is fine. But since you can connect on another network, it seems more likely that the firewall is blocking the connection rather than the XAUTH configuration.

Re: sshd

Yeah that's not it, if you use the -X it will turns ForwardX11 to yes, which I've set in the ssh_config for all users. If I hook up the machine on another network that isn't restricted I can connect fine. I have to have a chat with the firewall/network people.

Re: sshd

Depending on the version of SSH you're using, you might have a -Y option that will allow you to fake the XAUTH stuff. Otherwise, use -X on the command line and try again, after setting up your XAUTH stuff properly. I typically just use -Y (ssh -Y hostname) since I haven't bothered to learn how to do the XAUTH stuff properly.

Re: sshd

Here's what I get...

ssh -v -l tsvxi
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file /home/itdb1/.ssh/identity type -1
debug1: identity file /home/itdb1/.ssh/id_rsa type -1
debug1: identity file /home/itdb1/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.6.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '' is known and matches the RSA host key.
debug1: Found key in /home/itdb1/.ssh/known_hosts:67
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/itdb1/.ssh/identity
debug1: Trying private key: /home/itdb1/.ssh/id_rsa
debug1: Offering public key: /home/itdb1/.ssh/id_dsa
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: password
tsvxi@'s password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: channel 0: request pty-req
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: channel 0: request x11-req
debug1: channel 0: request shell
debug1: channel 0: open confirm rwindow 0 rmax 32768
Last login: Fri Jun 2 15:18:00 2006 from
[tsvxi@nubox3 ~]$ echo $DISPLAY
[tsvxi@nubox3 ~]$ xterm
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 43423
debug1: fd 7 setting O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11

It hangs on the last statement and the xterm never comes up on the machine I'm connecting from. It says "confirm x11." I think our corporate guys have locked down the firewall somehow. We'll see...until then, any other ideas?

Then after a while you end up with:
debug1: channel_free: channel 0: client-session, nchannels 2
debug1: channel_free: channel 1: x11, nchannels 1
Read from remote host Connection timed out
Connection to closed.
debug1: Transferred: stdin 0, stdout 0, stderr 96 bytes in 94
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.1
debug1: Exit status -1

Re: sshd

SSH does tunnel everything through port 22 as far as I know. Try using the -v flag with scp - the verbose output might offer clues as to what the problem is.