# [SOLVED]SSH over LAN -- newb questions

## koopdi

Hello,

I am am setting up gentoo on my workstation in order to take advantage of some open source chemistry modelling libraries (Reaction Mechanism Generator, QuantumEspresso, Gromacs, etc).

I am not very proficient at linux but the x86_64 installation guide has been easy to follow.

I have the base system up and running but I can't get the xorg server to start at all -- everything just locks up.

I'd like to SSH into my workstation so that I can better troubleshoot but I'm unsure how to go about it.

I have an old laptop with archlinux on it that is connected to the same LAN as the workstation.

Both machines are connected via wifi.

I tried just starting the sshd on the workstation then from the laptop running:

ssh my_account@the_workstations_ip

but this gave me a connection refused error.

Thanks in advance for any advice or helpful reading materials on this subject.

~peace~Last edited by koopdi on Tue Feb 15, 2011 11:30 pm; edited 1 time in total

----------

## NeddySeagoon

koopdi,

By default, all users with a shell can log in via ssh.

Are you sure sshd is running.  As root, 

```
/etc/init.d/sshd start
```

will start it. 

The first time it runs it has to generate its keys.  This uses a lot of entropy from the entropy pool and /dev/random will block if entropy runs out.

Moving the mouse will help to up the entropy pool.

With sshd running, you should be able to log in as root with 

```
ssh root@<IP_of_remote_host>
```

Allowing root logins over ssh is a security hole but its permitted by default.

 --- edit ---

You can test by logging into the system by ssh on itself.  

```
ssh root@127.0.0.1
```

should work, as should using the systems own IP.

Its not useful except for ruling out network problems.

----------

## platojones

I use keychain with ssh.  Great instructions for getting it all running here:

http://www.gentoo.org/doc/en/keychain-guide.xml

----------

## koopdi

I am running a dual opteron @2x2ghz...how long should it take to generate these keys?

I've been twirling the trackball for 10min or so but I don't see any output from /etc/init.d/sshd start

I logged on in another vt and ran /cat/dev/input/mouse0 to insure that my trackball was even connected and it surely was.

Odd thing is that after hitting ^C to end the cat process, that VT is now completely unreadable...really wierd. Is that normal?

----------

## koopdi

It works now.

I edited /etc/conf.d/rc and changed

RC_NET_STRICT_CHECKING

from no to none

...

Although I got it working this way, I suspect that this indicates something else about my configuration is wrong.

The "no" parameter should have resulted in just as true an expression as the "none" parameter.

Could this be some sort of problem where wlan0 needs to be added to a list of network interfaces explicitly???

----------

## NeddySeagoon

koopdi,

To start wlan0  you need a symlink in /etc/init.d that is called net.wlan0 pointing to net.lo

```
cd /etc/init.d

ln -s net.lo net.wlan0
```

At startup, your system will bring up wlan0 and attempt to use dhcp to get it an address.

If thats not what you want, play with the content of /etc/conf.d/net

I don't understand what changing RC_NET_STRICT_CHECKING from no to none did.

----------

## koopdi

RC_NET_STRICT_CHECKING="no" evaluates true if there is another net.* interface up other than net.lo, since I didn't have a symlink from net.lo to net.wlan0, there was no way for the script to check net.wlan0 even though it was up, this resulted in a false satement and caused sshd to try and start net.eth0, which of course failed because I wasn't plugged into an ethernet.

Now that I've made the symlink that you suggested, I've been able to change none back to no and it still results in a true statement and sshd doesn't erroneously try to bring up net.eth0.

woohoo

 *Quote:*   

> 
> 
> # RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service.
> 
> # The following values are allowed:
> ...

 

Now I got wireless to start automatically at boot! --

I ran

rc-update add net.wlan0 default

to add net.wlan0 to the startup routine

then edited this file to enable wpa

 *Quote:*   

> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> 
> # please review /etc/conf.d/net.example and save your configuration
> ...

 

Also running rc-update del net.eth0 default wasn't enough to keep the computer from hanging at startup as it tried to connect over ethernet,

I needed to negate all networks in from RC_PLUG_SERVICES in /etc/conf.d/rc:

 *Quote:*   

> 
> 
> # Some people want a finer grain over hotplug/coldplug. RC_PLUG_SERVICES is a
> 
> # list of services that are matched in order, either allowing or not. By
> ...

 

Thanks for your input everyone, I'm marking this thread as [solved] but please add more if you think it's relevant for the sake of others in the future who may be searching for this same information.

----------

