Bienvenido al foro un gusto que estes por aca, espero verte seguido 
besos

besos

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú


sudo apt-get install openssh-serversudo gedit /etc/ssh/sshd_configsudo /etc/init.d/ssh startsudo /etc/init.d/ssh stopsudo /etc/init.d/ssh restartsudo gedit /etc/ssh/sshd_config# Package generated configuration file
# See the sshd_config(5) manpage for details
# Ponemos el puerto a escuchar por el SSH, por defecto es el 22. Deberemos abrir un puerto en nuestro router redirigiendo hacia la IP interna de la máquina donde lo tengamos.
Port 1234
# Usaremos el protocolo 2 de SSH, mucho más seguro, por tanto forzamos a que siempre conecten por protocolo 2.
Protocol 2
# HostKeys for protocol version 2. El lugar donde se guardan las keys.
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 2048
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication, importante la parte PermitRootLogin...es vuestra decisión
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
MaxAuthTries 2
sudo chmod 700 make_chroot_jail.shsudo apt-get install fail2bansudo gedit /etc/fail2ban/jail.localsudo /etc/init.d/fail2ban startcd /var/log/gedit auth.log















y lo activaremos, el ta.key también ponemos la ruta completa de la ta.key.



























