Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157
Rep:
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
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?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157
Original Poster
Rep:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.