LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Enable SSH (https://www.linuxquestions.org/questions/linux-networking-3/enable-ssh-329138/)

carlosinfl 06-01-2005 05:57 AM

Enable SSH
 
I just installed Debian Linux on a server at home and am not sure if I can login via SSh to the machine. Is there a way I can find out if SSH is enabled and if not, how to enable SSH connections on the machine?

MikeAtVillage 06-01-2005 06:09 AM

you should be able to find if the ssh daemon is running by typing..

ps -C sshd



HTH

huibert.alblas 06-01-2005 06:14 AM

I don't think I understand you correctly...

to test if sshd is up and running, simply try
"ssh myuser@localhost"

If you get a passwordprompt, sshd is running.....

Or do you mean something else?

carlosinfl 06-01-2005 07:25 AM

I was trying to see if there is a way to see in my system settings if SSH was enabled.

Can I try "ssh myuser@localhost" in my firefox browser to test this?

If it does not work, how do I enable SSH on my system?

MikeAtVillage 06-01-2005 07:35 AM

No, you need to issue that command at a system prompt NOT a browser.

rhinux 06-01-2005 09:00 AM

typing...
netstat -a |grep ssh

start ssh
/etc/init.d/sshd start | stop | restart

carlosinfl 06-01-2005 04:31 PM

Quote:

Originally posted by MikeAtVillage
you should be able to find if the ssh daemon is running by typing..

ps -C sshd



HTH

Code:

carlos@debian:~$ ps -C sshd
  PID TTY          TIME CMD
 1581 ?        00:00:00 sshd

Quote:

typing...
netstat -a |grep ssh

start ssh
/etc/init.d/sshd start | stop | restart
Code:

debian:~# /etc/init.d/sshd start
-su: /etc/init.d/sshd: No such file or directory

I tried to login from work usin Putty and it failed so I am now in front of my machine and am not sure what the problem is.

ARC1450 06-01-2005 07:38 PM

Well, it seems SSH is running on your machine.

Are you behind a router of any sorts? Have you tried to log in from a computer on your home network?

I think Debian uses the "service" function to start things. Try "service sshd start" and see what that gives you.

carlosinfl 06-01-2005 08:13 PM

Yes, SSH is running and working fine. I just had to set SSH to forward to my debian LAN IP.

I still can't figure out how to start | stop | restart SSH service.

Code:

debian:~# service ssh restart
-bash: service: command not found


ARC1450 06-02-2005 01:14 PM

http://www.linuxquestions.org/questions/history/320881 << There you go.

Just type cd /etc/init.d and see how ssh is started. It may be with sshd or simply ssh. Hard telling. If it's not there, you can always apt-get it again and hopefully the correct script will be installed.

[edit]You are logged in as root when you try to do /etc/init.d/(servicename) start|stop|restart|zap, right?

codiesmokie 09-17-2005 03:33 PM

Fedora 3 problem with ssh
 
Hi all,


I just installed Fedora 3 and I disabled Firewall already.

I connected my Fedora box behide my DSL rounter.
I forward port 22 to my Fedora box.
I can log in to ssh by local IP but I cannot access by external IP.
I got an message "Server Responded Connection closed by remote host."

I look on sshd_config. I did enble everything but it still does not work.

If any one can help, I will be appreciated.

Thank you

Snowbat 09-17-2005 11:27 PM

It would help if you mentioned which DSL router it is.

Do you need to reboot the router for the port forward to activate?

Is port 22 reserved for the router's own use? This may not be obvious. Try forwarding a high port number on your router to port 22 on your Fedora box and see if that works.


All times are GMT -5. The time now is 05:09 PM.