LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-19-2009, 11:48 AM   #1
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
How do I ssh onto slackware 10 with no monitor


Neighbor gave me Aptiva K6-2 333mhz with 5gb hdd; 1 pci ethernet slot. Monitors lasted long enough for me to install Slackware 10 version of: http://slackwiki.org/Minimal_System ;which i don't know if that was really what I wanted because I was aiming to just install servers needed to run the box as web server (though i don't know how that will work b/c box only has 1 eth0 card and i have only 1 public IP Address
Have slackware12 on PIII w/ 2 ethernet cards, 2hdds= 320GB, XPbox, laptop. How do I setup ssh and remote into the headless box?
Do i have to setup sshd server on my 2wire gateway 1800HG (4 ethernet Ports, 1 USB Port; DSL Not Uverse Gateway) to open port22 on any machine i use to ssh into Aptiva with?
During slackware10 install, I think (don't remember exactly) i set sshd to startup because a string of numbers was generate during first boot; did not write them down. Did setup root passwrd and added 1 user and yes i know those psswrds. lol Anyone working on similar project in slackware forum?
Have read alot and am trying to piece bits of information mostly from non slackware posts. I need some basic guiding steps or step by step tutorials, howtos?
 
Old 08-19-2009, 12:19 PM   #2
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
Where $USER is the user name

Code:
ssh -l $USER {ipofslack10}
ssh -p 22 $USER@{ipofslack10}
or alternatively:
Code:
ssh -l root {ipofslack10}
ssh -p 22 root@{ipofslack10}
So an example:
ssh myusername@192.168.1.130


I expect your router to hand out DHCP, so the IP address will be dynamic. More often than not, you can log in to the routers webinterface and look at the IP leases. So that's how you can tell. There are more ways, but I guess this is a nice shortcut.


Quote:
Originally Posted by NightSky
(though i don't know how that will work b/c box only has 1 eth0 card and i have only 1 public IP Address
That's no matter. Welcome to TCP/IP and NAT routing. Your router can do this for you, probably called 'port forwarding' in the web interface.
 
Old 08-19-2009, 12:27 PM   #3
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
If you have a running slackware on your Aptiva K6-2 333mhz with 5gb hdd , you configured network and sshd is running on it?
You should be able to connect to it by ssh from linux (see commands posted by /dev/me), or with putty from windows.

Few qustions:
1. You want to run slackware web server on your Aptiva K6-2 333mhz with 5gb hdd?
2. Did you already setup slackware on it?
3. Did you set a valid network configuration for it?
4. Do you want to connect to this box (already without monitor) with ssh from the local network? Or from the public network?
5. Do you want to connect from another slackware desktop?
 
Old 08-19-2009, 04:00 PM   #4
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
Booted slackware10 box; I am at the login prompt
b/c i did not try to signin since i can't see what i am doing.

From bash prompt i shh username@ipslackware1
Results:
Quote:
Permanently added '192.168.1.10' (RSA) to the list of known hosts.Write failed: Broken pipe
Now what did i break and can i fix it?
2nd Try:
Signed into Aptiva blind then tried the ssh and I am in.
Now what? does this mean pipe is fixed?

**How do I run browser on ssh to test http.config is right?

hua,
Yes, I want to run webserver on Aptiva, yes only 5gb, but can i use from hdd resources from larger 2nd Slackware box?

Yes, I installed slackware10 without X11 graphics or sound, No I did not configure Netowrk because monitor died.
Yes, I have 2nd slackware12 box i want to ssh from.
Yes I want to ssh frm local network first to learn.

Last edited by NightSky; 08-19-2009 at 06:18 PM. Reason: status chnged.
 
Old 08-19-2009, 06:21 PM   #5
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
Quote:
Originally Posted by NightSky
Signed into Aptiva blind then tried the ssh and I am in.
Congrats!

Quote:
Originally Posted by NightSky
Code:
Permanently added '192.168.1.10' (RSA) to the list of known hosts.Write failed: Broken pipe
Now what did i break and can i fix it?
2nd Try:
(...)
Now what? does this mean pipe is fixed?
I never saw that before. Maybe a network problem? It chocked on something?

If it happens more often, try the '-v- flag on ssh, so you get something like this:

Code:
ssh -l username -v 192.168.1.10
That gives more detail.

---

Now the first thing you should do, is login to the remote machine and edit /etc/ssh/sshd_conf so that it contains these lines:
Code:
Protocol 2
PermitRootLogin no
This is the bare minimum. With 'PermitRootLogin no' root no longer can log in to the machine over ssh. You have to use another account to get in. Obviously, once in, you can su to root.
Protocol 1 is less secure and hardly used anywhere anymore. Only a few legacy systems still need it, I think. You can safely force the machine to accept only protocol 2 connections.

Another one I like myself is to change the default port to something random non-privileged like 7835
Code:
Port 7835
When the ssh port is facing the internet (port forwarding on your router), this keeps your logs clean. If you don't, then you'll notice lots and lots of login attempts per day. Changing the sshd port doesn't prevent a serious cracker to get into your system, but it does keep the script kiddies from trying. I think many people here recognize this, I used to get ~300 login attempts per day (none of them successful), changing the port and I've not had a single login attempt in ... ehm... I dunno, a year, two years?

As long as you are on your local network only, none of this really matters. But I feel it's best to pick up good habits as early as possible.


Quote:
Originally Posted by NightSky
Yes, I want to run webserver on Aptiva, yes only 5gb, but can i use from hdd resources from larger 2nd Slackware box?
Sure! Depending a bit on what you want in the end. 5GB is rather a lot of space for a website. I assume it's ye olde plain text HTML and some images of perhaps ~20kb a piece? Unless you are planning of hosting some download site, but then your upload limit becomes much more a problem than disk space will ever be.

The downside of using another disk in another machine is that you need to keep two machines running to have your website up. The upside is that you can put the website on a share that is 'read only'. NFS with root_squash or something to add another layer of security.
 
Old 08-20-2009, 03:12 AM   #6
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
The problem is probably this. I will call client your slackware12 desktop and server the Aptiva K6-2.

Each time the client connects to a ssh server the client saves RSA to the ./user/.ssh/known_hosts of the user who is trying to log into the ssh server.
This RSA is saved in /home/username/.ssh/known_hosts for later use. This key is saved in your local PC (from which you initiate ssh login). When you connect to the same server next time it uses the saved key. This was the:
Quote:
Originally Posted by NightSky
Permanently added '192.168.1.10' (RSA) to the list of known hosts.Write failed: Broken pipe
The write of this RSA failed because your client desktop has no user named username. And so it cannot save the RSA.
Quote:
Originally Posted by NightSky
From bash prompt i shh username@ipslackware1
Try this as root on client PC:

Code:
useradd username
su username
ssh 192.168.1.10
Quote:
Originally Posted by NightSky
Signed into Aptiva blind then tried the ssh and I am in.
Now what? does this mean pipe is fixed?
No I think that you just used ssh 192.168.1.10 (blind) and since you does this from root shell the client PC was able to save the RSA because root user does exist .
If you use only ssh 192.168.1.10, what user will be used for login??
If you are logged in (on the client shell) as root than root. If you are loged in as username than username.
And probably it does not even need to save it because the RSA was already there. The RSA is saved only the first time you are logging into ssh server.
Lets check it out in /root/.ssh/known_hosts. When you open this file you will see:
192.168.1.10 ssh-rsa CHXKDCI.....

This is the saved RSA key for host 192.168.1.10. If you delete this line the permanently adding process will repeate at next login.

PLease let us know if you have still problems with ssh connection. If not we can continue to configure your web server.

Last edited by hua; 08-20-2009 at 04:25 AM.
 
Old 08-20-2009, 10:46 PM   #7
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
yeh! i didn't go to work today... struggled all night with some obscure MSQL error but i wore it down till it took the configuration. Thank u sooo much, all the yrs i stuck it out with slackware. I read things umteen Xs till i get it.

First thing i did when i logged into Udot was config ssh, for 2 protocal and No X11 forwarding, Yes x11 localuse. i'm using port22 on Router, should i chnge it, this Option the one u r referring to /dev/me? Thought i'd use apps but i don't need that since 2 boxes are on at once.

Also did the same on slack12. I have ssh_config and sshd_conf?
Hua, I ssh into server from usr terminal not root. Today my login was rejected but i just tried till i got on. I will add server to host.allow on client and same on server.

Today i am working on setting up /etc/hosts, /etc/resolve, I am wanting DNS server setup since i have 2 slackware boxes now. Limitation being server only has 1 pci slot for ethernet ;(
Virtual Webserver? Multiple IPs per NIC? What do u think? Shld I configure httpd with SSL level security?
I am going to need help setting up my 2WIRE GATEWAY... a few settings i don't understand howto configure ie.Public Network Options, Bridge Network Option and right now its in Router Mode. There are online manuals I just don't know what Config Options Require.
ie. I took a look at the Port Options to chnge it frm 22 to reduce people trying to get into my servers, but I am not sure what protocal to use tcp, UDP, or PPTP.

Apache 1.41 ver is alot more intense than ver2 on slack12. The ssl/tls is already installed plus a ton of archived modules in apache/httpd.conf/default and there is apache/httpd.conf. Is the default the working program and httpd.conf the backup?

Oh, almost forgot, I cldn't find IPV4_forwarding option in inet2?
Guys i have to go. Will be back Monday. Thanks
 
Old 08-21-2009, 05:49 AM   #8
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
Quote:
Originally Posted by NightSky
i'm using port22 on Router, should i chnge it, this Option the one u r referring to /dev/me? Thought i'd use apps but i don't need that since 2 boxes are on at once.
Jup, that's the one.

For your internal network this doesn't need changing on the router. The router will just blindly forward whatever port to whatever IP internally. Keeping the default at 22 is good enough for internal usage. But as I said, it's never to early to develop good habits ;-)


Quote:
Originally Posted by NightSky
Also did the same on slack12. I have ssh_config and sshd_conf?
You don't need much configuration on the client side of things, unless you want to setup passwordless authentication. But one step at a time.

It's easy enough to specify on the client side which port to use, with the '-p' flag.


Quote:
Originally Posted by NightSky
Today my login was rejected but i just tried till i got on.
Interesting, I'm sure. Be sure you understand the concepts of remote connections, authentication and connection ports. It's really bad to lock yourself out with a persistent configuration on a headless server. On the other hand, it's a learning opportunity sine qua non ;-)

Quote:
Originally Posted by NightSky
Limitation being server only has 1 pci slot for ethernet ;(
That's too bad. It'll keep you from configuring your server as a gateway/router. A Slackware box as a gateway has a lot more options than a hardware router. On the other hand, a hardware router is probably safer (less mistakes to make) and you still have opportunity to build a DNS and DHCP out of the server.


Quote:
Originally Posted by NightSky
Today i am working on setting up /etc/hosts, /etc/resolve, I am wanting DNS server setup since i have 2 slackware boxes now.
Setting up /etc/hosts is easy enough. You'll figure it out. But it's not really a DNS server you'll have then, it's a static address book you have locally. If you want DNS server functionality, and perhaps add DHCP functionality to that as well... read on


It would help though if you can borrow a monitor somewhere as a failsafe. Most things Don't Work The First Time(TM).

Quote:
Originally Posted by NightSky
I am going to need help setting up my 2WIRE GATEWAY... a few settings i don't understand howto configure ie.Public Network Options, Bridge Network Option and right now its in Router Mode. There are online manuals I just don't know what Config Options Require.
Keep it in router mode. Without a second NIC on your server building a bridge is not what you want. Once you have DHCP running on your server you can turn this off on the router. I think this is what you want from your posts. I can recommend dnsmasq, it's easy to configure and it's your one stop shop for all your DHCP, DNS, TFTP and PXE needs.
Some may prefer specialized daemons for each of the tasks, but dnsmasq is easy to set up and pretty versatile and well documented: `vim /etc/dnsmasq.conf`

Quote:
Originally Posted by NightSky
Virtual Webserver? Multiple IPs per NIC? What do u think? Shld I configure httpd with SSL level security?
If you have the RAM, go virtual. I managed to get my Slack 12.2 virtual webserver under 390MB and I'm terrible at optimizing. You should do better ;-) It imports the site itself over a read only network share.
I used VirtualBox for that. It's great because it's completely configurable over the command line and it sets up bridging on your one NIC for you. It's much easier than I expected it to be, and well documented.


Quote:
Originally Posted by NightSky
Guys i have to go. Will be back Monday. Thanks
Well, good luck!
 
Old 08-22-2009, 04:04 PM   #9
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
dev/me; Am @ work so can't do much but want to Announce new aquisition AMD 900mhz, 128mb compaq PC for $10 at divorce garge sale! Can't wait to get into it!
With dnsmasq can I update my Public DHCP IP so I don't have the added expense of a static ip? I have tried OpenDNS but it seems slow? Will probably start out with virtual webserver box and dnsmasq. Like concept of virtual webserver. Lunch time is over back to the PIT. When I am rich i will get a second 21" Flat Screen. lol
 
  


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
Monitor program or application from ssh redrack Linux - Software 2 03-30-2008 04:04 AM
Install SSH on debian with no monitor... aktivemac Linux - Software 1 02-09-2008 07:55 PM
Need to monitor SSH attacks with Sebek ActiveX Linux - Security 6 10-14-2006 02:49 AM
How do i monitor SSH logins? gtwilliams Linux - Security 5 06-08-2005 10:43 PM
No monitor in X and no SSH haggertus Linux - Newbie 2 10-25-2003 06:33 PM

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

All times are GMT -5. The time now is 09:41 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