LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-10-2009, 10:39 AM   #16
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94

Hi,

no need to kill in.rshd in this case, right...?

BRGDS

Alex
 
Old 12-10-2009, 10:45 AM   #17
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
If you already have is.rshd installed then no need for the netkit. Is in.rshd running? Post the output of these commands:
Code:
ps -ef | grep rshd | grep -v grep
Code:
ls -l /usr/sbin/*rsh*
As an added check (hope you have the locate db updated)
Code:
locate rshd
Code:
grep rshd /etc/inetd.conf | grep -v '#'

Last edited by tux_dude; 12-10-2009 at 11:09 AM.
 
1 members found this post helpful.
Old 12-10-2009, 11:00 AM   #18
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Tux_Dude,

I'm not with my Slackware lappy right now... I am at the library of RIKEN right now using a W^%>S box...

I am googling for a solution for this problem, in google and in LinuxQuestions...

I have downloaded netkit, as well as netkit-kernel and netkit-filesystem (huge package btw... ) from SlackBuilds org.

I have downloaded these slackbuilds, as well as I have saved lots of google pages about "-nolisten TCP", "XDMCP", "hosts.allow", "xhost cannot connect to x server"... etc... all that may be vaguely related to the problem I have... to my usb stick...

As soon as I get back to my Slackware box, I will do as you told...

Crossing my fingers already...


Will have more news in a few hours...


Thanks a lot for teaching me the "esoteric" character of enabling some services in Slackware..


BRGDS

Alex
 
Old 12-10-2009, 11:07 AM   #19
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
Only "netkit-rsh" is required and only if you do not already have rshd installed. Do not install the others. Take it one step at a time so we can following along with what you are doing. Best not to install anything new until you provide the output of the commands above.
 
1 members found this post helpful.
Old 12-10-2009, 11:13 AM   #20
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
...Will be back in 4 hrs...

, and post the output of these commands...

c ya in a while...

BRGDS

Alex
 
Old 12-10-2009, 11:49 AM   #21
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by Alexvader View Post
well...

didn-t do much.... :-(

Here i am again...

... <SNIP> ...

I will now rm -rf ~/.ssh and

run as user... :

ssh-keygen -t rsa
press enter at all queries to allow for passwordless ssh login, and

cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys


then run as user ...

... <SNIP> ...

Alex
Alex --

What are the permissions on ~/.ssh/authorized_keys ?

Code:
ls -la ~/.ssh/authorized_keys
ssh won't accept your ~/.ssh/authorized_keys file unless the permissions are 600

Code:
chmod 600 ~/.ssh/authorized_keys
-- kjh
 
1 members found this post helpful.
Old 12-11-2009, 09:04 AM   #22
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi @Tux_Dude,@kjhambrick

Sorry for being late... Don't know what happened to the wireless access point, no PC seems to be able to connect...

Anyway... here I am... ran the checks... the results are :

bash-3.1# ps -ef | grep rshd | grep -v grep
bash-3.1# ls -l /usr/sbin/*rsh*
-rwxr-xr-x 1 root root 15880 2008-09-23 23:52 /usr/sbin/in.rshd
-rwxr-xr-x 1 root root 8248 2008-11-27 10:06 /usr/sbin/ownership
-rwxr-xr-x 1 root root 68576 2009-06-26 20:59 /usr/sbin/smrsh
bash-3.1# locate rshd
locate : fatal error: could not find user database /var/lib/slocate/slocate.db : no such file or directory
bash-3.1# grep rshd /etc/inetd.conf | grep -v '#'
bash-3.1#


So... guess in.rshd is there allright...
what must i do now...?


So far I have not touched anything, neither /etc/kde/kdm/kdmrc, nor /etc/ssh/ssh_config nor /etc/ssh/sshd_config, nor ~/.rhosts, nor have I generated ssh keypairs...

system is "AS INSTALLED", Only thing I have done is build Code-Aster into /opt/aster/*

What is next step...?


BRGDS

Alex
 
Old 12-11-2009, 09:35 AM   #23
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
rsh is there but it's not running.
Edit your hosts.allow and .rhosts files. Then run
Code:
/usr/sbin/in.rshd &
Check if rshd is running
Code:
ps -ef | grep rshd | grep -v grep
Then try connecting
Code:
rsh -n -l alex iskandhar.site echo hello

Last edited by tux_dude; 12-11-2009 at 09:41 AM.
 
1 members found this post helpful.
Old 12-11-2009, 10:08 AM   #24
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Tux_Dude,

So, I have changed my /etc/hosts.allow to
rshd : iskandhar.site alex

my .rhosts to

iskandhar.site alex

bash-3.1# /usr/sbin/in.rshd &
[1] 3837
bash-3.1# ps -ef | grep rshd | grep -v grep
[1]+ Exit 1 /usr/sbin/in.rshd
bash-3.1# rsh -n -l alex iskandhar.site echo hello

.... and stops there, shell hangs and says
iskandhar.site: connection refused

... :-(

I am in runlevel 3, is this an issue...?

BRGDS

Alex
 
Old 12-11-2009, 10:20 AM   #25
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
Quote:
Originally Posted by Alexvader View Post
rshd : iskandhar.site alex
Remove alex from the above line. You only need to specify the domain not the user.

Quote:
Originally Posted by Alexvader View Post
my .rhosts to

iskandhar.site alex
Add localhost to the .rhosts file.

Quote:
Originally Posted by Alexvader View Post
bash-3.1# /usr/sbin/in.rshd &
[1] 3837
bash-3.1# ps -ef | grep rshd | grep -v grep
[1]+ Exit 1 /usr/sbin/in.rshd
in.rshd died here. Run /usr/sbin/in.rshd again without '&'. Make sure you run it as root user.

Last edited by tux_dude; 12-11-2009 at 10:22 AM.
 
1 members found this post helpful.
Old 12-11-2009, 10:30 AM   #26
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Again

So...
my hosts.allow is now

rshd: iskandhar.site

my .rhosts is now

iskandhar.site alex
localhost alex

bash-3.1# /usr/sbin/in.rshd
bash-3.1#
bash-3.1# ps -ef | grep rshd | grep -v grep
bash-3.1# rsh -n -l alex iskandhar.site echo hello
iskandhar.site: connection refused

........................


must this be rebooted, or changed the runlevel...?


BRGDS

Alex
 
Old 12-11-2009, 11:03 AM   #27
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
No reboot required. I setup rsh on my box and I was getting the same problem. Turns out in.rshd has to be started by inetd. I fixed that, but now I'm getting the error "poll: protocol failure in circuit setup". I am looking into that I will let you know.

In order to connect:
1. Edit /etc/inetd.conf by uncommenting the line with 'in.rshd -L'
2. Restart inetd "/etc/rc.d/rc.inetd restart"
3. Now try connecting. You should not be getting connection refuse anymore.

Last edited by tux_dude; 12-11-2009 at 11:38 AM.
 
1 members found this post helpful.
Old 12-11-2009, 11:22 AM   #28
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Tux_Dude...

Will do this...

Have to go now... more ppl want to use this PC ( library PC ) I still have no dhcp offers from the wireless ap in my lappy ( nor anybody else, AFAIK... the router is cranked... )

Tomorrow, will be back w/more news and result of editing inetd.conf script...

Thnks for all yr help... :-)

If I get Code Aster working in Slackware, I'm going to Zapp Debian away from my lappy for good... ( so far, been using Slackware in a USB HDD connected to it... )


BRGDS

Alex
 
Old 12-11-2009, 11:50 AM   #29
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
Got it working. I am really really glad I use ssh. I put all the steps together so anyone searching can find it in one spot.
Perform as root user:
1. Ensure rshd is installed. These files should be present.
Code:
/usr/sbin/in.rshd
/usr/sbin/in.rlogind
/usr/sbin/in.rexecd
/usr/bin/rcp
/usr/bin/rsh
/usr/bin/rlogin
If not, install the netkit-rsh package from the slack repo.

2. Edit /etc/inetd.conf by uncommenting the lines with 'in.rshd -L' and 'in.rlogind'
Code:
# Shell, login, exec and talk are BSD protocols
#
shell  stream  tcp     nowait  root    /usr/sbin/tcpd  in.rshd -L
login  stream  tcp     nowait  root    /usr/sbin/tcpd  in.rlogind
3. Edit /etc/hosts.equiv with the domain(s) of the remote clients which will connect with rsh.
Code:
localhost
iskandhar
iskandhar.site
4. Edit /etc/hosts.allow and add "in.rshd: <domains of clients>" (localhost for the same box)
Code:
in.rshd: localhost,iskandhar,iskandhar.site
5. Restart inetd
Code:
/etc/rc.d/rc.inetd restart
Perform as user which will be connecting with rsh
6. Edit the user's .rhosts file and add the domains with the authorized users which can connect.
Code:
localhost
iskandhar alex
iskandhar.site alex
7. Change permission of .rhosts file
Code:
chmod 600 .rhosts
8. Test local connection
Code:
rsh -l <user> localhost ls -l

Last edited by tux_dude; 12-11-2009 at 01:49 PM.
 
1 members found this post helpful.
Old 12-12-2009, 12:37 PM   #30
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Tux_Dude

It worked Like a charm.... :-)

Thks for all your help... now the launching test performs ok...

There is only one more step to go... :

In a Finite Elements Calculation, the app ( ASTK , basically a Tcl/Tk GUI for input of Solver parameter, mesh, and output files names/paths ) calls for execution in an xterm window, and drops a script in a folder called ~/flasheur.

In a "correctly set" environment, the calculation can be launched from ASTK gui, calculation will proceed in an XTERM, till the end, when xterm dies, and result files are where you "instructed" ASTK to drop them.


I guess thet the rsh functionality is only for the solver to be able to play along with intermediate result files between /tmp/astk ( thats where they get dumped ...) and your work folder.

In my installation, ASTK does not launch an xterm, still, it dumps the calculation setup script in ~/flasheur, and if i call it within that directory, it will perform the calculation allright...rsh is enabled, so files get copied and moved around...


But not being able to have the xterm automatically called from within ASTK ( I guess this is called TCP tunelling... right..?! ) hinders the ability to let Aster perform batch calculations in an optimization loop for instance...

I guess this is where the /etc/kde/kdm/kdmrc --nolisten TCP and the ssh thing come into play....

What must I do for ASTK to be able to call an XTERM...?

( Pls not that I do this from runlevel 3/startx into fluxbox...

1) Is TCP tunelling to X already enabled in init 3 ( BTW...does init 3 ever "sees" /etc/kde/kdm/kdmrc...? ), or must I go into Init 4...?
2) Do I have to tweak some more files to enable Tcp tunelling to X... ? ( maybe this is where the ssh thing apply...)


Thanks in advance

BRGDS

Alex

Last edited by Alexvader; 12-12-2009 at 12:39 PM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
About rsh dinesh Linux - Networking 2 12-07-2006 10:00 PM
Rsh consty Red Hat 1 07-21-2006 05:57 PM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 09:34 AM
DHCP fails, IP fails, packet framing errors? alonsomosely Fedora 2 09-17-2004 11:22 AM
Encrypted Reiserfs Fails to Mount -- Reiserfsck Fails as Well antic Linux - Hardware 0 07-30-2004 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration