SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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)
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 )
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.