Super Newbie trying to see if SSH is running or not.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Super Newbie trying to see if SSH is running or not.
Like I say in all my threads, I am a Linux Super Newbie. I have just installed Linux not to long ago and of course command line is very awkward for me. So far I found the Linux community to be very helpful, even when it must be like pulling teeth to help me. Thanks to everyone that has contributed to my Linux education!
My latest adventure is to run the SSH daemon (I think that is what you guys call it) and try to login to my Linux machine from an outside network. I do have a firewall router in the middle of all of this.
I have given it a good shot at trying to set this up, but I just can’t log in. There are probably several dumb reasons why I can’t. Here is where I am at (well here is Part I):
The first thing I did was go into the directory /etc/ssh and made a copy of the file “sshd_config”. I named that file sshd_config-backup and left it in the same directory.
I edited the “sshd_config” file to have “Port 504” (I heard it was more secure to keep it away from 22). I also edited the “PermitRootLogin yes” to “PermitRootLogin no”. I saved that file in the same ssh directory.
Here is the first weird thing: I opened a terminal window and I typed: “/etc/init.d/ssh start” and it spat out “Start OpenBSD Secure Shell server: sshd”. So I take that as “yes – it’s running”. Then I typed “ps –ef | grep sshd” to see it is running and I noticed that all the time durations are 00:00:00. I am guessing that this means nothing is running. But I don’t really know because I am just a newbie…
Can anyone tell me if this was the right way to check if it was running or not? And if it is not running, what should I do to get it to start running?
ok I logged into my machine as a guest and then I tried this which is leading me to think that it is working:
guest@1[~]$ ssh -p 504 localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is ec:6e:0c:17:12:70:66:93:db:6c:d5:02:57:e3:79:be.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
Password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
MEPIS 3.3
Most of the programs included with MEPIS Linux are freely
redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright
MEPIS Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
That means that you have an ssh-daemon running (sshd), an ssh user agent
running (/usr/bin/ssh-agent /usr/bin/startkde) and that you're grepping
for ssh (grep ssh).
Ok the second part of this adventure is for me to try to login to the Linux machine from my windows machine using SSH. Now both the Linux machine and the PC are connected to the same router. The router/firewall is connected to my DSL modem.
I installed this SSH program for my PC called PenguiNet. I haven't been able to login remotely to the Linux machine using this program. I have tried many different combinations of inputs here. I am not quite sure what I am doing though. Below I have listed the possible inputs for connecting using this SSH program (after my questions). Most of them seem pretty obvious.
My Questions:
1. For the Host input. Do I put my router's IP address or the Linux Machine's IP address? Or the Linux Machine's IP address when it's not on a router (it's true IP address)?
2. For the Port input. I have picked 504 to be my port of choice, but do I put in 22 here, or 504?
3. UTF8. Don't know what that is for. Keep it unchecked?
4. Username and password: I have set my ssh config file to not let people remotely login as root. So do I use my Linux machine's guest login name and password? Or do I have to set this up somehow?
5. SSH Authorisation. Password or Key Pair? Do I need both SSH1 and SSH2 Key pairs?
6. Finally the port forwarding. I don't know what to put for "From Port", "Forwarded Port" or "Forwarded to host"...
LOGIN TAB:
Profile name: (looks like something optional, where I can give it a name)
Host:
Protocol: (SSH, Telnet or SCP)
Port:
Terminal Type: (Linux, VT100, xTerm)
UTF8 (this is just a checkbox that is currently not checked)
Username:
Password:
SSH TAB:
SSH Version: (Automatic, FORCE SSH1, FORCE SSH2)
Compression: (Ranges from Level 0 which is no compression, to Level 9 which is maximum, it's currently set to 6 which is the default)
Authorisation via: (Password - default, Public/Private Key Pair)
SSH1 Key Pair:
SSH 2 Key Pair:
PORT FORWARDING BUTTON:
From Port:
Forwarded Port:
Forwarded to Host: (currently says localhost)
Protocal: (Normal, FTP)
1. The Linux machine's IP address
2. 504 - the server is running on 504, not the normal 22
3. it's a character encoding, leave alone unless there is messed up text
4. use a normal/guest user account and password
5. password, you have not set up key authentication
6. no forwarding
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.