Notices


Reply
Thread Tools
Posts: 129 | Thanked: 11 times | Joined on Jan 2009 @ New York, NY
#61
I've been reading this thread and trying to follow the instructions carefully, but I can't seem to get past step one. When I try to ssh into my computer, I get the response:

/etc/ssh.ssh_config line 50: Unsupported option "GSSAPIAuthentication"
/etc/ssh.ssh_config line 51: Unsupported option "GSSAPIDelegateCredentials"
ssh: connect to host 192.168.2.20 port 2222: No route to host

I have checked with the PFPortChecker that the ports are open(5800 & 5900), and that I edited the CopSSH ssh_config and sshd_config files were edited, uncommenting the port line to "port 2222" to no avail.

Any help will be greatly appreciated!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#62
Originally Posted by jmc8501 View Post
I've been reading this thread and trying to follow the instructions carefully, but I can't seem to get past step one. When I try to ssh into my computer, I get the response:

/etc/ssh.ssh_config line 50: Unsupported option "GSSAPIAuthentication"
/etc/ssh.ssh_config line 51: Unsupported option "GSSAPIDelegateCredentials"
ssh: connect to host 192.168.2.20 port 2222: No route to host

I have checked with the PFPortChecker that the ports are open(5800 & 5900), and that I edited the CopSSH ssh_config and sshd_config files were edited, uncommenting the port line to "port 2222" to no avail.

Any help will be greatly appreciated!
This means there is no route to 192.168.2.20/32, which is a private IP address.

You might have configured your WiFi as DMZ, not allowing traffic to/from WiFi to LAN.

Also, when you are out and about you will want to SSH to your _external_ IP address.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 129 | Thanked: 11 times | Joined on Jan 2009 @ New York, NY
#63
Thanks for the quick response guys!

I did first go through all the other steps before trying this, and I have also rebooted my system since then a few times.

And I've just checked the DMZ settings on the routers settings page, and I followed these instructions (I'm doing this from home, using the same wifi as my laptop):

DMZ
The DMZ feature allows you to specify one computer on your network to be placed outside of the NAT firewall. This may be necessary if the NAT feature is causing problems with an application such as a game or video conferencing application. Use this feature on a temporary basis. The computer in the DMZ is not protected from hacker attacks. To put a computer in the DMZ, enter the last digits of its IP address in the field below and select "Enable". Click "Submit" for the change to take effect.
So I did, but got the same response. Also, I have the built-in router firewall turned off, so I'm not sure this would be the problem.

Thinking about the last line on allnameswereout's post, I tried to ssh with my external ip address (even though both laptop and n810 are using the same wifi router), and this time it did request my password, but then immediately logged me out.

here is the command I used:
ssh -L5901:127.0.0.1:5900 155.174.211.137 -lMauricio -p 2222 -v
and here is the output:
OpenSSH_5.1p1 Debian-6.maemo2, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
/etc/ssh/ssh_config line 50: Unsupported option "GSSAPIAuthenticati on"
/etc/ssh/ssh_config line 51: Unsupported option "GSSAPIDelegateCred entials"
debug1: Connecting to 155.174.211.137 [155.174.211.137 ] port 2222.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenS SH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-6.maemo2
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: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
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 '[155.174.211.137 ]:2222' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:3
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_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keybo ard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug1: Trying private key: /home/user/.ssh/id_rsa
debug1: Trying private key: /home/user/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keybo ard-interactive
debug1: Next authentication method: password
Mauricio@155.174.211.137's password:
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:5901 forwarded to remote add ress 127.0.0.1:5900
debug1: Local forwarding listening on 127.0.0.1 port 5901.
debug1: channel 0: new [port listener]
socket: Address family not supported by protocol
debug1: channel 1: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US
debug1: Sending env LC_MESSAGES = en_US
Last login: Wed Sep 30 17:42:35 2009 from 155.174.211.137
debug1: client_input_channel_req: channel 1 rtype exit-status reply 0
debug1: client_input_channel_req: channel 1 rtype eow@openssh.com r eply 0
debug1: channel 1: free: client-session, nchannels 2
debug1: channel 0: free: port listener, nchannels 1
Connection to 155.174.211.137 closed.
Transferred: sent 1824, received 2136 bytes, in 0.4 seconds
Bytes per second: sent 4450.4, received 5211.6
debug1: Exit status 1
Thanks for the ideas, but I'm still hoping for more!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#64
jmc8501, I meant that you probably had DMZ on. Can you check your N810 IP address and your Windows computer IP address are in the same subnet? Probably, your WiFi gets 192.168.2.0/24 and your LAN gets 192.168.1.0/24.

In the second command you pasted, you were able to connect to connect from WAN to your SSH server on external_ip:2222. The fact you are immediately logged out might indicate your login shell is b0rked. Check your SSHd logs.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 129 | Thanked: 11 times | Joined on Jan 2009 @ New York, NY
#65
My computer's ip is 192.168.2.20, and my tablets is 192.168.2.2 - does that mean they are on the same subnet? (I'm a complete beginner...)

I tried checking the log files on my computer for CopSSH, but they seemed empty (specifically the "sshd-stderr.log" and "sshd-stdout.log" files) - what do you mean by "your login shell is b0rked."?
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#66
As for your first question: If we assume your netmask is 255.255.255.0, yes. Some routers have option to still not allow traffic between WLAN and LAN.

As for your second question, short story: try adding -N flag to your SSH command and see what happens.

And the long story: What I meant with that b0rked statement is that, in that case you posted ssh client log, routing and portforwarding works, you are able to send and receive TCP packets to OpenSSH server port 2222. The SSH protocols match, the authentication succeeds... so you get far further than when it is stuck on no route to host.

..but then it immediately logs out. If it executed your port forwarding it'd stay connected until you quit it (or networking problem), and to kill the tunnel you'd use ^C (Ctrl+C). Instead, you get debug1: Exit status 1 (different than 0; 0 means no error), in this case usually problem is 1) login shell doesn't exist 2) or is set to /bin/false (or something similar). Check the OpenSSH's /etc/passwd and see if it is correct set. The -N flag will not execute the remote command and is recommended in situations like these.

@ Jay that reminds me, if you don't want to use OpenSSH to remotely log in to your computer to get a shell but do wish to use only port forwarding (ie. only want to use OpenSSH to run VNC server) you can harden OpenSSH server further. Worth it to discuss or not...?
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#67
Originally Posted by JayOnThaBeat View Post
Uhhhhh.....
I'm not really sure what you mean.
My reference was OpenSSH server on Windows. Not Nokia N8x0/N900.

If user only wants to run OpenSSH server on Windows computer to port forward VNC over, other features like allowing a remote shell are unnecessary. So you can instead of /bin/bash give a shell like /bin/true and use -N flag in ssh command. This way, someone who sees you typing your password cannot remotely log in to your Windows computer over SSH.

SSH keys might also be interesting.

Not sure if SSHFS requires a shell though.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 129 | Thanked: 11 times | Joined on Jan 2009 @ New York, NY
#68
Originally Posted by allnameswereout View Post
As for your first question: If we assume your netmask is 255.255.255.0, yes. Some routers have option to still not allow traffic between WLAN and LAN.

As for your second question, short story: try adding -N flag to your SSH command and see what happens.

And the long story: What I meant with that b0rked statement is that, in that case you posted ssh client log, routing and portforwarding works, you are able to send and receive TCP packets to OpenSSH server port 2222. The SSH protocols match, the authentication succeeds... so you get far further than when it is stuck on no route to host.

..but then it immediately logs out. If it executed your port forwarding it'd stay connected until you quit it (or networking problem), and to kill the tunnel you'd use ^C (Ctrl+C). Instead, you get debug1: Exit status 1 (different than 0; 0 means no error), in this case usually problem is 1) login shell doesn't exist 2) or is set to /bin/false (or something similar). Check the OpenSSH's /etc/passwd and see if it is correct set. The -N flag will not execute the remote command and is recommended in situations like these.

@ Jay that reminds me, if you don't want to use OpenSSH to remotely log in to your computer to get a shell but do wish to use only port forwarding (ie. only want to use OpenSSH to run VNC server) you can harden OpenSSH server further. Worth it to discuss or not...?
@allnameswereout
I have found the "passwd" file on my laptop, but how do I set it correctly, "/bin/true" ?

And there is no "openssh" folder or "passwd" folder in the /etc on my N810 (although it does have an "openvpn" folder, a program which I've been trying to delete for some time..http://talk.maemo.org/showthread.php...063#post340063 )

I tried adding the "-N" at the end of the command, but I've gotten a different response this time - it says "connecting to host..." and the "connection timed out" Now, even if I remove the -N command, I get the same response.

As a side note, I tried using the bash shell on my laptop that comes with Copssh, and tried to ssh to a work computer, but it told me:

$ ssh mauricio@[known ip-address]
ssh: connect to host [known ip-address] port 2222: Connection timed out

This "[known ip-address]" is one that I connect to regularly using PuTTY (which I also have installed on my laptop) and it gives me no problems. I'm not sure if this is relevant, of course.

Thanks!

PS: I found a "last log" text file and a "wtmp" text file. The former was mostly blank, except for a few *random* characters and my IP address, and the second had many more random characters along with my username and my IP addresss floating around.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#69
Originally Posted by jmc8501 View Post
As a side note, I tried using the bash shell on my laptop that comes with Copssh, and tried to ssh to a work computer, but it told me:

$ ssh mauricio@[known ip-address]
ssh: connect to host [known ip-address] port 2222: Connection timed out

This "[known ip-address]" is one that I connect to regularly using PuTTY (which I also have installed on my laptop) and it gives me no problems. I'm not sure if this is relevant, of course.
Try:

ssh mauricio@[known ip-address] -p 22

That will set the SSH port to the standard 22 rather than the non-standard 2222. That's probably what's going wrong there.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
Posts: 129 | Thanked: 11 times | Joined on Jan 2009 @ New York, NY
#70
Thanks qole, that does allow me to ssh our from my laptop successfully! Could this be related to my inability to ssh into my laptop from my N180?
 
Reply

Tags
ssh tunnel, vnc, windows


 
Forum Jump


All times are GMT. The time now is 12:41.