Pages : 1
#1 Le 14/02/2007, à 21:22
- cicio
[résolu bêtement]pb connexion ssh/mysecureshell
bonsoir à tous;
après qq recherches je me suis décidé à installer un sftp sur ma machine pour transférer des fichiers depuis une autre machine de manière sécurisée à l'aide des paquets openssh server et mysecureshell..
j'ai suivi les tutos de la doc ubuntu mais aussi ceux du site de MSS ici
http://mysecureshell.sourceforge.net/fr/confman.html#question3
j'ai : 1. configuré le /etc/ssh/sshd_config (avec entre autre un autre port que celui par default, l'authentification par mot de passe, et une restriction d'user via allowusers..)
2. configuré le /etc/ssh/sftp_config avec une configuration ajusté sur l'utilisateur que j'ai crée au préalable en faisant :
sudo adduser --home /home/toto --shell /bin/MySecureShell toto
(l'utilisateur "toto" est un exemple")
3. ouvert le port dans mon firewall
4. redemarré via sudo /etc/init.d/ssh restart
malheureusement lorsque je me connecte en local via lftp sftp://toto@localhost:monport
j'ai bien après saisie du mot de passe la ligne suivante:
lftp toto@localhost:~>
mais une simple commande "ls" est impossible, j'ai l'impression que la connexion n'est pas faite,
d'ailleurs meme avec après un sudo /etc/init.d/ssh stop j'ai également la réponse lftp toto@localhost:~> après tentative de connexion..
merci de m'éclairer de vos lumières
voici mon /etc/ssh/sshd_config:
# Package generated configuration file
# See the sshd(8) manpage for details# What ports, IPs and protocols we listen for
Port 322
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
ListenAddress 192.168.1.1
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#utilisateur autorisé
AllowUsers l'utilisateurquej'aicréé# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768# Logging
SyslogFacility AUTH
LogLevel INFO# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yesRSAAuthentication 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 yesX11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
puis mon /etc/sftp_config
## MySecureShell Configuration File ##
#Default rules for everybody
<Default>
</Default><User l'utilisateurquej'aicréé>
GlobalDownload 50k #total speed download for all clients
# o -> bytes k -> kilo bytes m -> mega bytes
GlobalUpload 0 #total speed download for all clients (0 for unlimited)
Download 5k #limit speed download for each connection
Upload 0 #unlimit speed upload for each connection
StayAtHome true #limit client to his home
VirtualChroot true #fake a chroot to the home account
LimitConnection 10 #max connection for the server sftp
LimitConnectionByUser 1 #max connection for the account
LimitConnectionByIP 2 #max connection by ip for the account
Home /home/l'utilisateurquej'aicréé #overrite home of the user but if you want you can use
# environment variable (ie: Home /home/$USER)
IdleTimeOut 300 #(in second) deconnect client is idle too long time
ResolveIP true #resolve ip to dns
</User>
merci de votre aide
Dernière modification par cicio (Le 14/02/2007, à 22:27)
Hors ligne
#2 Le 14/02/2007, à 22:25
- cicio
Re : [résolu bêtement]pb connexion ssh/mysecureshell
bon j'ai essayé divers bricoles et j'ai tout bêtement commenté la ligne dans sshd_config "listenaddress 192.168.1.1" et là ça marche....
va comprendre...
si par ailleurs vous voyez des erreurs dans mes configs je suis preneurs
bonne soirée à tout le monde
Hors ligne
Pages : 1