Pages : 1
#1 Le 19/02/2008, à 13:24
- PsYKrO
SSH, MySS, et clé RSA
Bonjour,
J'ai Ubuntu 6.10,
J'ai installé MySecureShell
sftp-verif >> tout OK
j'ai crée l'utilisateur test >> test:x:1003:1005::/home/test:/bin/MySecureShell
Voici mon fichier SSHD_CONFIG
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes no
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes
MaxStartups 10:30:60
Banner /etc/issue.net
AcceptEnv LANG LC_*
PermitUserEnvironment=no
#Subsystem sftp /usr/lib/sftp-server
Subsystem sftp /bin/MySecureShell.sh
Voici mon fichier MySecureShell.sh
#!/bin/sh
/bin/MySecureShell -c sftp-server
Voici mon fichier sftp-config:
## MySecureShell Configuration File ##
#Default rules for everybody
<Default>
home /home/
HideNoAcess true
</Default>
<User test>
Download 200k
Upload 0
VirtualChroot true
StayAtHome true
LimitConnection 5
home /home/test/
</User>
dans /home/test/.ssh, j'ai ma clé authorized_keys
Si je me connecte, avec un utilisateur sans le shell /bin/MysecureShell mais avec /bin/false par exemple, j'accède en SSH (via putty) et en SFTP (via WinSCP).
Vous me direz, c'est normal que tu puisses pas accéder en SSH avec un shell MysecureShell.
Mais mon probleme c'est que je n'arrive meme pas à me connecter avec Winscp:
Error getting name of current remote directory.
Connection has been unexpectedly closed.
si je lui remet un /bin/bash par exemple, j'accede ave WinSCP et je peux me balader partout dans l'arborescence grrrrrrrrrrrrrrrrrrr
Merci
Hors ligne
Pages : 1