LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Network settings (https://www.linuxquestions.org/questions/linux-newbie-8/network-settings-615923/)

morfeus80 01-24-2008 02:26 AM

Network settings
 
Hallo, I'm trying to setup a network that is required to run a program (OpenFOAM), following a described procedure inthe manual, but I have some problems.

The first step is:

OpenFOAM requires a basic level of networking to be set up. Firstly,
the host name must be set - to test, type 'uname -a'. The running
shell must be tcsh, csh, bash or ksh - to test type 'echo $SHELL'

The user must be able to 'ping' the host machine itself (<host>) - to
test, type 'ping -c 1 <host>'

If the ping fails then it is possible that that the entry for the host
machine is missing, incorrect or duplicated in the /etc/hosts
file. The user can check this by typing 'grep <host> /etc/hosts' which
should return a single line, typically of the form:
<IPaddress> <host>.<domain> <host>
...


What have I to write in plce of <host>?

jay73 01-24-2008 03:32 AM

Oh, that one I can still answer for you. You have to assign your computer a hostname. Just open /etc/hosts and put in this:

your IP address hostname.domain alias

for example:

127.0.0.1 localhost.localdomain localhost
127.0.1.1 MyBox.athome.net MyBox

The first line should already be there. The second one needs to be added; all you have to do is make up a hostname (MyBox in the example) and a domain name(athome.net, again only an example). If your computer is in a network, you should probably use the same domain name as the one used for the other computers.

As soon as your computer has a hostname, you can ping it:

ping -c3 MyBox

It should send 3 packets and then report that 3 have been received. You can then also test, say, ssh:

ssh MyBox ls

morfeus80 01-24-2008 04:55 AM

Ok, now it works, thanks!

Now I have to do the following operation:

The machine must have one of (or both) remote (rsh) and secure shell
(ssh) running on his/her account. To check whether rsh is running
correctly, the user should type 'rsh <host> ls'. Alternatively the
user can check if ssh is running correctly by typing 'ssh <host> ls'.
In either case, the output to the command should produce a
file/directory listing for the current directory and no other text. If
neither command works, we recommend the user set up rsh for their use
as follows:

Check the rsh executable actually exists, e.g. the path to the
executable should be returned when typing 'which rsh'. Check with the
system administrator that rsh is enabled on the user's account; if
not, request that it is enabled. Create a '.rhosts' file in the $HOME
directory containing entries to access any machines they need to
access, i.e. their own machine and, if different, the licence host
machine. The entries are of the form: '<host> <user>'.

Remote shell accesses the .bashrc (or .cshrc) file and will not run
correctly if there is a problem with this file. In particular the user
should be careful with the following:

The .cshrc (or .bashrc) file should not contain errors that prevent it
from executing fully at startup; all error messages during execution
of the .bashrc (or .cshrc) file should be investigated and acted upon
to eliminate them. echo (print to screen) statements within .bashrc
(or .cshrc) must not be executed during the running of rsh. This does
not mean that echo statements are forbidden from the .cshrc (or
.bashrc) file, but they must be enclosed in a control structure,
e.g. an if statement, that ensures they are not executed when rsh is
executed, e.g. for .bashrc:

if [ "$PS1" ]; then
echo "..."; fi

and, for .cshrc:

if ($?prompt) then ; echo "..." ; endif


When I type 'rsh <host> ls' , I have this message : Connection refused.

What can I do? Is a problem of permission I have to set from the root account?

jay73 01-24-2008 05:36 AM

You need to create an .rhosts file in your home directory that specifies the machines that are allowed to connect to your box through rsh. It should contain their fully qualified domain name (i.e. hostname and domain, as you used it in your /etc/hosts file) - one per line - and optionally, on the same line, the name of the user(s) on each machine who should be allowed in (e.g. root). And have you verified yet that your rsh server is actually running?

morfeus80 01-24-2008 05:42 AM

I created the file in /home/morfeus80 adding a lne like this:

MyBoX Morfeus80

where Morfeus80 is the username I use to login Linux

But it still refuse the connection! Have I to source it or do some else?

jay73 01-24-2008 06:02 AM

MyBox is not the fully qualified name (see previous post) - it's only the hostname, the domain is missing.


All times are GMT -5. The time now is 11:37 AM.