Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]SSH over LAN -- newb questions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
koopdi
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2011
Posts: 100

PostPosted: Sun Feb 13, 2011 11:20 pm    Post subject: [SOLVED]SSH over LAN -- newb questions Reply with quote

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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Sun Feb 13, 2011 11:33 pm    Post subject: Reply with quote

koopdi,

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

Are you sure sshd is running. As root,
Code:
/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
Code:
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.
Code:
ssh root@127.0.0.1
should work, as should using the systems own IP.
Its not useful except for ruling out network problems.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sun Feb 13, 2011 11:40 pm    Post subject: Reply with quote

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

http://www.gentoo.org/doc/en/keychain-guide.xml
Back to top
View user's profile Send private message
koopdi
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2011
Posts: 100

PostPosted: Sun Feb 13, 2011 11:44 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
koopdi
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2011
Posts: 100

PostPosted: Mon Feb 14, 2011 2:33 am    Post subject: Reply with quote

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???
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Tue Feb 15, 2011 8:05 pm    Post subject: Reply with quote

koopdi,

To start wlan0 you need a symlink in /etc/init.d that is called net.wlan0 pointing to net.lo
Code:
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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
koopdi
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2011
Posts: 100

PostPosted: Tue Feb 15, 2011 11:01 pm    Post subject: Reply with quote

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:
# none - The 'net' service is always considered up.
# no - This basically means that at least one net.* service besides net.lo
# must be up. This can be used by notebook users that have a wifi and
# a static nic, and only wants one up at any given time to have the
# 'net' service seen as up.
# lo - This is the same as the 'no' option, but net.lo is also counted.
# This should be useful to people that do not care about any specific
# interface being up at boot.
# yes - For this ALL network interfaces MUST be up for the 'net' service to
# be considered up.

RC_NET_STRICT_CHECKING="no"


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
# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )
config_wlan0=( "dhcp" )
wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"


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
# default we allow services through as RC_COLDPLUG/RC_HOTPLUG has to be yes
# anyway.
# Example - RC_PLUG_SERVICES="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.

RC_PLUG_SERVICES="!net.*"


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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum