LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
LinkBack Search this Thread
Old 01-02-2013, 10:45 AM   #1
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Rep: Reputation: 166Reputation: 166
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!
 
Old 01-02-2013, 01:29 PM   #2
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 89

Rep: Reputation: 20
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
 
Old 01-02-2013, 01:45 PM   #3
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Original Poster
Rep: Reputation: 166Reputation: 166
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.
 
Old 01-02-2013, 02:06 PM   #4
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Original Poster
Rep: Reputation: 166Reputation: 166
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
 
Old 01-04-2013, 09:42 PM   #5
padeen
Member
 
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware 14, Debian 7, FreeBSD, OpenBSD
Posts: 158

Rep: Reputation: 32
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.
 
Old 01-05-2013, 05:43 AM   #6
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Original Poster
Rep: Reputation: 166Reputation: 166
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.
 
  


Reply

Tags
cross-lfs, dropbear, lfs, raspberry pi, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues compiling GCC v4.7.1 while building LFS for ARM (Raspberry Pi) jvilla1983 Linux From Scratch 7 12-25-2012 02:03 PM
Cross-LFS Splits from LFS weibullguy Linux From Scratch 0 09-06-2009 08:20 PM
[SOLVED] Cross-LFS RealTimeClock does not work timmytycoon Linux - Hardware 2 06-28-2009 05:29 AM
Cross-lfs Glibc-2.4 EXS Linux From Scratch 1 06-09-2006 02:03 PM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration