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 04-28-2005, 11:26 PM   #1
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Rep: Reputation: 30
Ssh?


Hello all. I was wondering what are the steps that I need to take to make it so that my friend can ssh into my machine from a remote location. I have absolutely no experience in setting something like this up, just curioius to see if someone could guide me through it. Thanks.


-onelung
 
Old 04-28-2005, 11:36 PM   #2
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
You need to give him a user account (shell) and start the ssh daemon, which is already started by default in Slackware. Go through the normal 'adduser' process, and assign him a login and password. Give him that info.

If your machine has a direct connection to the net, you can give him your ip address and he should be able to 'ssh name@ip.address.example'. If you're behind a router, you need to set up port forwarding to your internal IP address.

--Shade
 
Old 04-28-2005, 11:51 PM   #3
mcalizo
Member
 
Registered: Aug 2003
Location: Manila, Philippines
Distribution: RH
Posts: 43

Rep: Reputation: 15
First, You need to make sure that you have an installed ssh server.

Command:
rpm -qa | grep ssh

openssh-3.9p1-8.0.1
openssh-server-3.9p1-8.0.1 ----- you should have this
openssh-askpass-3.9p1-8.0.1
openssh-askpass-gnome-3.9p1-8.0.1
openssh-clients-3.9p1-8.0.1 ---- you should have this also

Second you need to make sure that your ssh daemon is started before your friend can connect to your machine.
Command:
ps -ef | grep sshd
root 3349 1 0 01:53 ? 00:00:00 /usr/sbin/sshd --- you need to see this running

Third you have to determine if your firewall is allowing port 22 connection from outside your network. This scenario is only applicable if you have a public IP and your friends also, but if your only trying to connect tru your LAN you can ask your friend to telnet your IP address port 22.


Your friend's command.

If you are done and successfull with the steps above, you have to create a user account for your friend which he will be using if he is now trying to connect to your machine.

Command to connect to your machine:
---------------
ssh (your ip address) -l (user name you created)
---------------
ssh 192.168.1.1 -l mike

Thats it...

Mike
 
Old 04-28-2005, 11:55 PM   #4
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
He's running slackware the rpm -qa command won't be appropriate for him.

If you did a full install, onelung, sshd will already be installed and running.

--Shade
 
Old 04-29-2005, 01:00 AM   #5
mcalizo
Member
 
Registered: Aug 2003
Location: Manila, Philippines
Distribution: RH
Posts: 43

Rep: Reputation: 15
OHHHHHHHHHHHHHHHH....URGHHHHHHHHHHH... SOrry man...
 
Old 04-29-2005, 08:17 AM   #6
nukey
Member
 
Registered: Dec 2004
Location: Netherlands
Distribution: Slackware
Posts: 173

Rep: Reputation: 30
Ok, the slackware way.

To check if it is installed

ls /var/log/packages | grep ssh

To check if it is running.

2 ways

ps aux | grep ssh
or
nmap localhost | grep ssh

And also read the other posts regarding how to add a user and how to connect
 
Old 04-29-2005, 08:35 AM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
Quote:
Originally posted by nukey
Ok, the slackware way.

To check if it is installed

ls /var/log/packages | grep ssh

To check if it is running.

2 ways

ps aux | grep ssh
or
nmap localhost | grep ssh

And also read the other posts regarding how to add a user and how to connect
ls /var/log/packages/* | grep sshd ( don't forget the /* )
and the server is called sshd ( deamon )

...just to be complete...

egag
 
Old 04-29-2005, 08:45 AM   #8
nukey
Member
 
Registered: Dec 2004
Location: Netherlands
Distribution: Slackware
Posts: 173

Rep: Reputation: 30
Quote:
Originally posted by egag
ls /var/log/packages/* | grep sshd ( don't forget the /* )
and the server is called sshd ( deamon )

...just to be complete...

egag
You don't need the /* after packages

nukey@box:/$ ls /var/log/packages | grep ssh
openssh-4.0p1-i486-1


And your right, the service is called sshd, but when you do a "ps aux | grep ssh" only the sshd will show up (unless you're ssh-ing to another machine at that moment)
 
Old 04-29-2005, 09:10 AM   #9
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
my bad....

i meant smth. diff.

grep sshd /var/log/packages/*

you are checking on package-names and the above checks on filenames.
( that's what i use... )

....and the d was just to be complete....
( but i was just complete wrong... )

egag
 
Old 04-29-2005, 09:43 AM   #10
nukey
Member
 
Registered: Dec 2004
Location: Netherlands
Distribution: Slackware
Posts: 173

Rep: Reputation: 30
Quote:
Originally posted by egag
my bad....

i meant smth. diff.

grep sshd /var/log/packages/*

you are checking on package-names and the above checks on filenames.
( that's what i use... )

....and the d was just to be complete....
( but i was just complete wrong... )

egag
Glad that's all sorted out

I just really like that /var/log/package directory the easiest way (maybe not the best) to see what's installed on your system.
 
Old 04-30-2005, 08:27 PM   #11
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Original Poster
Rep: Reputation: 30
as soon as I get situated I am going to try this out, thanks for the flood of replies!!!!! I will let you know how it goes. Unil then...



-onelung
 
Old 04-30-2005, 08:51 PM   #12
DaWallace
Member
 
Registered: Feb 2004
Location: Southern Maine, United States
Distribution: Slackware Ubuntu Debian FreeBSD
Posts: 418

Rep: Reputation: 31
argh. with the redhat people.. always giving useless advice.

ssh is the easiest thing I've ever dealt with in linux. I've never had to reconfigure it or anything.

if it's installed and /etc/rc.d/rc.sshd is set as executable it'll run at boot.
 
Old 05-01-2005, 03:27 AM   #13
nukey
Member
 
Registered: Dec 2004
Location: Netherlands
Distribution: Slackware
Posts: 173

Rep: Reputation: 30
Quote:
Originally posted by DaWallace
argh. with the redhat people.. always giving useless advice.

ssh is the easiest thing I've ever dealt with in linux. I've never had to reconfigure it or anything.

if it's installed and /etc/rc.d/rc.sshd is set as executable it'll run at boot.
Indeed, very easy.

However, there are 2 things i like to configure:

open /etc/ssh/sshd_config

Protocol 2 (so it only accepts ssh protocol 2 attempts)
AllowUsers nukey (for example) (here you can define witch users may login)
PermitRootLogin no (so no-one is able to directly ssh to my box as root, maybe it's not that big issue but i like to keep it tight )

Last edited by nukey; 05-01-2005 at 03:28 AM.
 
Old 05-01-2005, 11:52 AM   #14
RandomLinuxNewb
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 101

Rep: Reputation: 15
You should modify /etc/ssh/sshd_config and set PermitRootLogin to no. This will protect you from people who try to break in to your box. If you need root just login with your standard login and then use the su command to change to root.
 
Old 05-10-2005, 02:18 PM   #15
edafe
Member
 
Registered: Feb 2005
Posts: 44

Rep: Reputation: 15
Public Key Authentication with SSH

Maybe this is of some use:

http://www.edafe.org/slackware/index...authentication

Regards,
Edafe
 
  


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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
[SSH] Issue logging in [SSH & Permissions] MD3 Linux - Networking 11 12-10-2006 09:25 AM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
I turned off SSH, but I cant get it back! How do you start SSH on boot? nmoog Slackware 2 02-08-2004 05:18 PM
ssh issue: /usr/bin/ssh -x -oFallBackToRsh no -l WeNdeL Linux - Software 1 03-04-2003 07:17 PM

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

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