Ho una debian con Kernel:
Linux MyWorld 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686 GNU/Linux
Sono riuscito a configurare tutto leggendo le varie guide su questo sito e cercando su google, ma non riesco a configurare SSH nonostante abbia fatto parecchie prove e letto parecchi HowTo. Ho bisogno che la debian faccia da server ed io tramite client windows possa collegarmi alla macchina da qualsiasi host. Probabilmente l'errore sta nel file di configurazione e nei sucessivi step, ma non riesco a trovare una soluzione.
Questo è il mio /etc/ssh/sshd_config: <br />Port 22<br />#ListenAddress 192.168.1.1<br />HostKey /etc/ssh/ssh_host_key<br />ServerKeyBits 1024<br />LoginGraceTime 600<br />KeyRegenerationInterval 3600<br />PermitRootLogin no<br />IgnoreRhosts yes<br />IgnoreUserKnownHosts yes<br />StrictModes yes<br />X11Forwarding yes<br />PrintMotd yes<br />SyslogFacility AUTH<br />LogLevel INFO<br />RhostsAuthentication no<br />RhostsRSAAuthentication no<br />RSAAuthentication yes<br />PasswordAuthentication yes<br />PermitEmptyPasswords no<br />
E questo il mio /etc/ssh/ssh_config:
<br /># Site-wide defaults for various options<br /> Host *<br /> ForwardAgent yes<br /> ForwardX11 yes<br /> ForwardX11Trusted yes<br /> RhostsAuthentication no<br /> RhostsRSAAuthentication no<br /> RSAAuthentication yes<br /> PasswordAuthentication yes<br /> FallBackToRsh no<br /> UseRsh no<br /> BatchMode no<br /> CheckHostIP yes<br /> StrictHostKeyChecking no<br /> IdentityFile ~/.ssh/identity<br /> Port 22<br /> Cipher blowfish<br /> EscapeChar ~<br />
Ho messo yes sulle voci X11 perchè mi interessa accedere dai client in modalità grafica, ma quello per il momento è un problema secondario. Dopo aver configurato i files in questo modo (con la speranza che siano corretti) quali sono i passi successivi? Ho provato dando <i><b>ssh-keygen -t dsa</i></b>, ho inserito una passphrase e poi ho copiato la chiave privata id_dsa sul client windows. Li' ho usato puttygen per convertirla in un linguaggio che putty riconoscesse, ma mentre tentavo di loggarmi non vi riuscivo. Putty si chiudeva lasciando nel log d'errore " no autenthication methods left to try" (una cosa simile) e dava anche "Server refused our key". Ho anche provato a creare una chiave da windows e a farla leggere, ma non sono riuscito. Facendo altre prove dopo aver letto la guida questo è quello che ne viene fuori<br />m3d@MyWorld:~$ ssh-keygen -t dsa<br />Generating public/private dsa key pair.<br />Enter file in which to save the key (/home/m3d/.ssh/id_dsa):<br />/home/m3d/.ssh/id_dsa already exists.<br />Overwrite (y/n)? y<br />Enter passphrase (empty for no passphrase):<br />Enter same passphrase again:<br />Your identification has been saved in /home/m3d/.ssh/id_dsa.<br />Your public key has been saved in /home/m3d/.ssh/id_dsa.pub.<br />The key fingerprint is: f9:c9:0c:be:8f:0c:c7:51:8f:50:6e:97:9b:12:5a:71 <br />m3d@MyWorld:~$ scp .ssh/id_dsa.pub 192.168.1.3:~/.ssh/<br />Warning: Permanently added '192.168.1.3' (RSA) to the list of known hosts.<br />Permission denied (publickey).<br />lost connection<br />m3d@MyWorld:~$ ssh 192.168.1.3<br />Permission denied (publickey).<br />
192.168.1.3 è l'Ip della scheda di rete che c'e' sul server.Spero possiate aiutarmi che non riesco a venirne a capo.Grazie anticipatamente e scusate per la lunghezza del post




mmmm ... strano. <br /><br />La mia configurazione di default mi permette di loggarmi da qualsiasi parte del mondo io sia.<br /><br />Due cose. <br />1 ) La macchina windows da cui tenti di loggarti è all'interno della stessa rete del server ssh ? ( niente firewalls nel mezzo ) <br /><br />2 ) Se non lo è : sei sicuro che il router abbia la porta ssh ( 22 ) aperta e redirezionata sulla macchina su cui vuoi loggarti ?<br /><br />Questi sono i miei files di configurazione ... e funziona tutto <br /><b> /etc/ssh/sshd_config </b><br /><div class="xoopsCode"><code><pre>
# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# 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
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
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
# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive 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
</pre></code></div><br /><br /><b> /etc/ssh/ssh_config </b><br /><div class="xoopsCode"><code><pre>
# $OpenBSD: ssh_config,v 1.20 2005/01/28 09:45:53 dtucker Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
SendEnv LANG LC_*
HashKnownHosts yes
</pre></code></div><br />hope it helps <br /><br /><br />Marco
magic is real ... unless explicitly declared as integer