Show pageOld revisionsBacklinksCopy this pageBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. <title>SSH manuel</title> L'objectif de cet exercice est d'effectuer à la main l'ensemble des actions effectuées par SSH lors d'un envoi de fichier par SCP.\\ Fichiers : {{ssh_manuel.tar.gz|}} ==== Pré-requis ==== Fabien génère sa paire de clés et envoie sa clé publique à Kamal. <code> # openssl genrsa -out FabienPriv.key 2048 # openssl rsa -in FabienPriv.key -pubout -out FabienPub.key # scp FabienPub.key 10.0.1.111:/root/ssh_manual </code> Kamal génère sa paire de clés et envoie sa clé publique à Fabien. <code> # openssl genrsa -out Kamal.key 2048 # openssl rsa -in Kamal.key -pubout -out KamalPub.key # scp KamalPub.key root@10.0.1.108:/root/ssh_manuel </code> <code> # cat > CipherList <<EOF aes-256-cbc;des-cbc EOF # openssl rsautl -sign -in CipherList -inkey FabienPriv.key -out CipherList.signed # scp CipherList.signed 10.0.1.111:/root/ssh_manual </code> Kamal choisi un cipher et m'envoie la réponse ''Cipher.signed''. <code> # openssl rsautl -verify -in Cipher.signed -pubin -inkey KamalPub.key -out Cipher # cat Cipher aes-256-cbc # openssl rand -out SymKey 32 # cat > Message <<EOF Le Stade rennais football club, couramment abrégé en Stade rennais FC, Stade rennais ou SRFC, est un club de football français fondé en 1901. EOF # openssl enc -e -in Message -out Message.crypted -kfile SymKey # openssl rsautl -encrypt -pubin -inkey KamalPub.key -in SymKey -out SymKey.crypted # openssl sha1 SymKey SHA1(SymKey)= fecc5073912511a5eefef2388507153704d02833 # cat > SymKey.sha1 <<EOF fecc5073912511a5eefef2388507153704d02833 EOF # openssl rsautl -sign -in SymKey.sha1 -inkey FabienPriv.key -out SymKey.sha1.signed # scp Message.crypted SymKey.sha1.signed SymKey.crypted 10.0.1.111:/root/ssh_manual </code> ssh_manuel.txt Last modified: 2016/02/05 14:10by fab