Operating System - Linux
1825771 Members
2144 Online
109687 Solutions
New Discussion

Restrict to accept ssh session only in authorized_keys

 
SOLVED
Go to solution
Tonatiuh
Super Advisor

Restrict to accept ssh session only in authorized_keys

Red Hat Enterprise Linux 4

I have my ~/.ssh/authorized_keys with public keys generated into the client machine.

What else do I must configure to restrict that server only accepts session from that client?
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: Restrict to accept ssh session only in authorized_keys

Shalom,

modify ssh_config or sshd_config

You can tell ssh to only listen for a particular IP address.

Then:
service ssh restart

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: Restrict to accept ssh session only in authorized_keys

You should modify the /etc/ssh/sshd_config file, you have the options:

AllowUsers
PasswordAuthentication no

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Tonatiuh
Super Advisor

Re: Restrict to accept ssh session only in authorized_keys

I have configured successfully my conecctio. My server only accepts ssh sessions from my machine through a public/private key.