blog
Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
SSH SFTP chroot
Voir aussi :
useradd partage # useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead. groupadd sftpusers usermod -aG sftpusers partage mkdir /sftp mkdir /sftp/partage chown partage:partage /sftp/partage chmod 700 /sftp/partage
Test
sudo -u partage ls /sftp/partage
Si besoin
chmod o+x /sftp/
/etc/ssh/sshd_config
Subsystem sftp internal-sftp Match Group sftpusers ChrootDirectory /sftp/ ForceCommand internal-sftp -d /%u
systemctl restart sshd
Notes Ansible SemaphoreUI
Voir :
Voir aussi :
- Rundeck
- Polemarch
- Gitlab-CI
- AWX
Voir aussi autour d'AWX / Ansible :
- ARA Records Ansible
curl -X 'GET' -H 'Authorization: Bearer nb8jzkj3rcgoxej99onocburcsstghqhalnbsq5v6mg=' -H 'accept: text/plain; charset=utf-8' 'http://localhost:3000/api/project/1/templates' | jq .
Pb ssh - key type ssh-rsa not in PubkeyAcceptedKeyTypes
Sur AlmaLinux 8
# journalctl -u sshd -f août 27 11:42:28 plop.acme.local sshd[35283]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedKeyTypes [preauth]
Solution
# update-crypto-policies --show DEFAULT:NO-SHA1:NO-SSHCBC:NO-WEAKMAC # update-crypto-policies --set legacy Setting system policy to LEGACY Note: System-wide crypto policies are applied on application start-up. # update-crypto-policies --show LEGACY
Voir /etc/crypto-policies/back-ends/opensshserver.config
Ou (ne marche pas sous AlmaLinux 8)
/etc/ssh/sshd_config
PubkeyAcceptedAlgorithms=+ssh-rsa
Notes SSH proxy jump ProxyCommand
L’intérêt étant de ne pas déposer ailleurs sa clef SSH privée
ssh -t -A serveurBastionRebond ssh serveurPlop118
Ou plus simple :
~/.ssh/config
Host serveurPlop118
ProxyCommand ssh -W %h:%p bastion
### Si besion
Host bastion
Hostname 192.168.2.34
Avec sshpass
~/.ssh/config
Host l12* 192.168.* !pom01 !l12srvpom01 !192.168.50.160
User admin
ProxyCommand sshpass -e ssh -W %h:%p pom01
Host l12srvpom01 pom01
Hostname 192.168.50.160
User admin
read -s SSHPASS export SSHPASS
Pb
$ ssh -t -A bastion ssh -o StrictHostKeychecking=no 192.168.1.22 Permission denied (publickey). Shared connection to 171.33.90.69 closed
Solution
ssh -O stop bastion
ou
ssh -o ControlMaster=no 192.168.1.22
Exemple
~/.ssh/config
Host rebond
Hostname 192.168.89.155
User jean
Host old-rhel5
Hostname 192.168.50.20
User root
ProxyCommand ssh -W %h:%p rebond
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
SetEnv TERM=linux
Host old-rhel3
Hostname 192.168.50.30
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
Ciphers +aes256-cbc
SetEnv TERM=linux
Host centreon
Hostname 192.168.50.21
User root
ProxyCommand ssh -W %h:%p rebond
RemoteForward 3128 192.168.89.221:3128
LocalForward 8081 localhost:80
# ExitOnForwardFailure yes
# SendEnv LANG LC_*
blog.txt · Dernière modification : de 127.0.0.1
