OESF Portables Forum

Everything Else => Desktop Operating Systems Issues => Zaurus General Forums => Archived Forums => Linux Issues => Topic started by: jerrybme on July 28, 2004, 06:18:42 pm

Title: SSH Weirdness
Post by: jerrybme on July 28, 2004, 06:18:42 pm
OK, I just moved from Mandrake to Slackware 10 on my laptop. I'm able to ping my Z after
Code: [Select]
#ifconfig usb0 192.168.129.201when I try to
Code: [Select]
#ssh root@192.168.129.201 it asks for a password. Well, I haven't set a password for root (yes, I know not good practice). So, I set a password, tried it again and same problem
Code: [Select]
root@192.168.129.201's password:
Permission denied, please try again

This used to work on Mandrake 10, not clear what I'm doing wrong  

Any suggestions? (other than going back to Mandrake 10)

I haven't messed with the sshd_config file yet, because since it used to work I don't want to mess it up further.

TIA
Jerry
Title: SSH Weirdness
Post by: msjones on July 29, 2004, 01:01:02 pm
I've got the same problem. I'm running 3.3.6pre1 on 5600. I set a password with passwd command and enter this at prompt but access denird.
Title: SSH Weirdness
Post by: bluedevils on July 29, 2004, 03:22:42 pm
could you get in as zaurus user?
Title: SSH Weirdness
Post by: jerrybme on July 29, 2004, 04:43:48 pm
Quote
could you get in as zaurus user?
No, zaurus doesn't work either. I've modified my qpe.sh file to run as root.

The real pisser is with my laptop booted into winbloze, putty can ssh into my Z as root or zaurus without problems.  

I tried playing with the ssh_config file but have not been able to find the magic combo to make it work.
When I get time I'll try going through the man file in more detail.

Cheers,
Jerry
Title: SSH Weirdness
Post by: msjones on July 29, 2004, 05:59:05 pm
Ok, I got mine working. I am able to ssh into my Z from my Fedora desktop. First, the info that helped me set it up are here (http://www.ruault.com/Zaurus/ethernet-over-usb-howto.html) and here. (http://fedoranews.org/anewman/connectZ/). Do ifconfig -a to make sure you have ethernet and usbd0 recognised. My network settings on Z are ip:192.168.129.201, subnet mask:255.255.255.0 and gateway:192.168.129.0/24. I also have loopback enabled though I'm not sure if I need it. My etc/resolv.conf on Z has, domain [computername]@localhost.localdomain and nameserver 192.168.129.200. I ssh to my desktop by: ssh [computername]@localhost.localdomain. My desktop asks if I want to accept and I type yes. I am then added automatically to known hosts on desktop. Even though my usbd0 was up I still had the problem with password when I tried to ssh from my desktop, so I rebooted my Z in the cradle and rebooted my desktop with Z in the cradle while turned on and it finally worked..
Title: SSH Weirdness
Post by: jerrybme on July 30, 2004, 02:15:00 pm
Thanks msjones for the reminder, I had forgotten the "add route" step. I had added a script to hotplug in my old Mandrake but had forgotten that step. Now with
Code: [Select]
#ifconfig usb0 192.168.129.1 netmask 255.255.255.0 up
#route add -host 192.168.129.201 usb0
I can ssh in with no problem (at some point I gotta learn more about networking so I understand why this works
   )

Next step to automate the process in hotplug so I can forget how to do it again!  

Cheers,
Jerry
Title: SSH Weirdness
Post by: jerrybme on July 30, 2004, 03:27:04 pm
Yes!  

It's all working seamlessly now. I created the script
Code: [Select]
#! /bin/bash
typeset -i num
num=`ifconfig | grep usb0 | wc -l`
if [ $num -eq 0 ]; then
ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
route add -host 192.168.129.201 usb0
fi
named it usbnet and placed it in /etc/hotplug/usb. Now when ever I plug in the Z it's ready to go.

Thanks msjones again for pointing me in the right direction!

Cheers,
Jerry
Title: SSH Weirdness
Post by: msjones on August 02, 2004, 12:51:00 pm
Glad that helped! I am still having a little problem with my connection so maybe you or someone else could give me a hand? In order to connect to my Z from my desktop I found I have to first type sshd on my Z in order for it to accept the connection. Is there a setting somewhere that will automatically bring up sshd on my Z?
Title: SSH Weirdness
Post by: jerrybme on August 02, 2004, 01:21:05 pm
Quote
Glad that helped! I am still having a little problem with my connection so maybe you or someone else could give me a hand? In order to connect to my Z from my desktop I found I have to first type sshd on my Z in order for it to accept the connection. Is there a setting somewhere that will automatically bring up sshd on my Z?
Which Z & which ROM?
Title: SSH Weirdness
Post by: msjones on August 02, 2004, 01:32:32 pm
5600 and openzaurus.
Title: SSH Weirdness
Post by: msjones on August 02, 2004, 02:27:29 pm
Sorry, rom is 3.3.6pre1 poodle for 5600.
Title: SSH Weirdness
Post by: msjones on August 04, 2004, 10:09:59 pm
Bump
Title: SSH Weirdness
Post by: Foxdie on August 05, 2004, 04:04:18 am
msjones, just out of curiousity have to checked to see if sshd is set to start up properly in /etc/inetd.conf ?

Here's how the line reads on my C760:

Code: [Select]
ssh    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/sshd -i
Title: SSH Weirdness
Post by: msjones on August 05, 2004, 04:53:45 am
I don't have a line like that in inetd.conf.  Is the file structure on the 5600 different then the c760? Also, I notice that when I ssh into the Z, or visa versa, and then end the sesion by closing the terminal, I cannot ssh from my Z again untill I reboot. sshd -d shows it cannot bind to port 22 because another application is listening on 0.0.0.0. I tried /usr/sbin/sshd stop but it doesn't help. I'm not sure of the right command to stop the previous sesion so I can restart sshd, and I am not sure why it won't start and stop automatically.
Title: SSH Weirdness
Post by: msjones on August 10, 2004, 12:16:33 pm
OK, I entered
Quote
ssh    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/sshd -i
into my /etc/inetd.conf. I don't have a tcpd but I do have a tcpdump so my line looks like,
ssh    stream  tcp     nowait  root    /usr/sbin/tcpdump  /usr/sbin/sshd -i.
Is this correct or should I have
ssh    stream  tcpdump     nowait  root    /usr/sbin/tcpdump  /usr/sbin/sshd -i?

Are there any other files I should modify? Right now I am using openssh as it came with 3.3.6pre1 without modifying any files. I still have to type sshd after a reboot.