LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Problem ssh'ing into Cross LFS on Raspberry Pi (https://www.linuxquestions.org/questions/linux-from-scratch-13/problem-sshing-into-cross-lfs-on-raspberry-pi-4175443827/)

Keith Hedger 01-02-2013 10:45 AM

Problem ssh'ing into Cross LFS on Raspberry Pi
 
Got a bit of an odd one; I have just cross compiled and installed lfs on a raspberry pi, I am using the original debian/raspberry kernel for now as it seems to work, I have installed dropbear and everything boots a fine, now the problem:
FROM pi I can ssh into my lfs system fine both as user (keithhedger) and as root.

FROM lfs if I try to login from like so
Code:

ssh keithhedger@192.168.1.186
I get
Code:

PTY allocation request failed on channel 0
If I try to login as root
Code:

ssh root@192.168.1.186
I get
Code:

Permission denied, please try again.
If I try
Code:

ssh keithhedger@192.168.1.186 "/bin/ash -i"
It logs in but spits out this error:
Code:

/bin/ash: can't access tty; job control turned off
But otherwise works, but I still get the same "Permission denied" error if I try to use
Code:

ssh root@192.168.1.186 "/bin/ash -i"
HELP!

hoes 01-02-2013 01:29 PM

Just a few guesses, maybe you have tried it already:

* Are you allowed to login as root? It could be disabled because it is considered a security risk.
* Is something going wrong with the creation of a psuedoterminal? Both results seem to indicate some problems there. (PTY and tty errors)
* Does your ssh program have the right permissions?
* Can you log in when connecting to localhost from the pi?

Good luck

Keith Hedger 01-02-2013 01:45 PM

Yes the root account is enabled and login is ok.
/dev/tty's are created /dev/ptmx is created, nothing in /dev/pty.
I assume the permissions are ok cos I can login as normal user when using ash, but there may be some subtlety I am missing.
I tried ssh'ing from the pi to the pi and it just hung but shh'ing out is ok.

Keith Hedger 01-02-2013 02:06 PM

Small update the problem is DEFINITELY on the pi system as I have just tried ssh'ing in from slackware on a different machine and get the same errors

padeen 01-04-2013 09:42 PM

I'm not clear about what you have running. Can you clarify if you have a RPi that you have compiled LFS and virtualised a boot into LFS using a Debian kernel running in virtualization? Or do you have *two* pi systems, one running native Debian and one running LFS?

I suspect you are seeing two unrelated errors. One is not being able to login as root, a normal error, and one is the tty issue, which is not a normal error.

Anyway, this suggests the problem is that the pts devices were not being created as needed. My hunch would be that the Debian kernel is not setting up devices as you would expect them to be. Either create them manually or compile a proper LFS kernel (ouch).

I think the Debian kernel is a reasonable suspect given how much Debian edits the kernel config. Fine when running Debian on a Debian system, perhaps not fine on other systems that are expecting the kernel to do it a different way.

Keith Hedger 01-05-2013 05:43 AM

The system on the pi was a pretty basic cross compiled lfs (compiled on lfs) using busy box from here:http://cross-lfs.org/view/clfs-embedded/arm/index.html.

I tried a couple of different kernels and decided that the problem was probably with mdev the udev replacement not creating ptys, /dev/ptmx was made and the /dev/pts folder was created and mounted from this line in the fstab:
Code:

devpts        /dev/pts    devpts gid=4,mode=620  0    0
I don't use virtual machines as a lot of problems on this forum seem to be posted by people trying to build lfs on a virtual machine.

I also had some other build problems so for now I have installed slackware onto the pi and will now try and build a full lfs which I have done 3 or 4 time on my desktop, hopefully that will work better.

I agree about debian though, I haven't used it in a number of years and I forgot how horrible it was.

I am going to leave this post open in case someone finds a solution for future use.


All times are GMT -5. The time now is 01:23 AM.