PDA

Visualizza la versione completa : Tunneling SSH


SkOrPiOn`87
14-12-2005, 15:43
Ciao,

Devo fare tunneling ssh, e per farlo ho creato un user aposta per ssh, e perņ dovrebbe entrare senza la richiesta di password, per fare questo ho fatto in modo di loggarsi con una Key...

ho creato la key:

ssh-keygen -b 2048 -t dsa -f keysuser

una volta fatto questa, devo configurare qualcos dentro il config ssh?

il client ssh con quale opzioni si deve connettere a me per avere il tunneling?


Grazie :ciauz:

prometeus
14-12-2005, 21:10
Dai un occhiata qui (http://www.syn-ack.it/tips/sicurezza/tunnel_ssh.html) e qui (http://www.syn-ack.it/tips/sicurezza/chiavi_ssh.html).

SkOrPiOn`87
14-12-2005, 21:45
io che utilizzo SSH2 ho fatto:

ssh-keygen -b 2048 -t dsa -f keysuser

mkdir .ssh

cat keysuser.pub >> .ssh/authorized_keys
cat keysuser.pub >> .ssh/authorized_keys2

ma non č cambiato niente...
Questa operazione l'ho fatta bene?

Oppure devo fare anche:
cat keysuser >> .ssh/authorized_keys
cat keysuser >> .ssh/authorized_keys2

Grazie :ciauz:

SkOrPiOn`87
14-12-2005, 21:51
Questo č il config

# Package generated configuration file
# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for
Port 6583
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

AuthorizedKeysFile %h/.ssh/authorized_keys

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 600
PermitRootLogin no
StrictModes no

RSAAuthentication yes
PubkeyAuthentication yes


# 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 no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Change to yes to enable tunnelled clear text passwords
PasswordAuthentication no

X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes


Banner /etc/issue.net

Subsystem sftp /usr/lib/sftp-server

UsePAM yes

Loading