ssh base - configurazione di sistema da terminale
DESCRIPTION
Master: Amministratore Linux - Livello Base Nel contesto della formazione professionale rivolta ad aziende ed enti pubblici, sono stati preparati ed erogati dei corsi di Amministratore di sistemi Linux, al livello base ed al livello avanzato. Il contenuto del corso è allineato con alcuni moduli della certificazione LPIC (Linux Professional Institute Certification), a cavallo tra i livelli 1 e 2. Tutto il materiale didattico è disponibile liberamente con licenza Creative Commons BY-NC-SA. I docenti del corso sono i proff. Giovanni Squillero, Bartolomeo Montrucchio e Fulvio Corno. Maggiori informazioni: http://elite.polito.it/index.php/teaching/current-courses/255-master-linux-adminTRANSCRIPT
![Page 1: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/1.jpg)
![Page 2: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/2.jpg)
SSH
DATI
AUTENTICAZIONE
CHIAVE PRIVATA
CHIAVE PUBBLICA
password
Percorso 5 Configurazione 2
![Page 3: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/3.jpg)
Generare una chiave
• Comando: ssh-keygen
• Algoritmo
– DSA o RSA?
• Dimensione della chiave – ssh-keygen -b bits
– : 128, 256, 512, 768, 1024, 2048, 4096, … ?
Percorso 5 Configurazione 3
![Page 4: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/4.jpg)
Generare una chiave
Percorso 5 Configurazione 4
![Page 5: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/5.jpg)
Chiave pubblica
• Appendere la chiave pubblica nel file
~/.ssh/authorized_keys
della macchina a cui si desidera accedere
• Trasmettere la chiave pubblica
– spedirla per email
– verificare la fingerprint per telefono
Percorso 5 Configurazione 5
![Page 6: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/6.jpg)
Esempio di authorized_keys
Percorso 5 Configurazione 6
![Page 7: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/7.jpg)
Utilizzo
ssh [-v] utente@host
– si collega al computer remoto come utente
– utilizzare -v (o -vv) per cercare di diagnosticare i problemi
Percorso 5 Configurazione 7
![Page 8: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/8.jpg)
Sistema dei pacchetti
• dpkg
– installa, rimuove, configura pacchetti .deb
• apt (Advanced Packaging Tool)
– in origine: front-end per dpkg
– apt-get, apt-config, …
• aptitude
– in origine: frontend per apt
Percorso 5 Configurazione 8
![Page 9: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/9.jpg)
Sistema dei pacchetti
• Synaptic
• Ubuntu Software Center
Percorso 5 Configurazione 9
![Page 10: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/10.jpg)
Sistema dei pacchetti
• Packages vs. Meta-packages
Percorso 5 Configurazione 10
![Page 11: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/11.jpg)
Repository
• Modificare il file «/etc/apt/sources.list » – man apt-get
– man sources.list
• Slang: «repo»
Percorso 5 Configurazione 11
![Page 12: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/12.jpg)
Suggerimenti
• Installare aptitude $ sudo apt-get install aptitude
– interfaccia quasi user friendly a carattere
– può sostiture apt-get
Percorso 5 Configurazione 12
![Page 13: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/13.jpg)
Aggiornare il sistema
• Aggiornare la cache dei pacchetti $ sudo aptitude update
• Installare gli aggiornamenti $ sudo aptitude full-upgrade
Percorso 5 Configurazione 13
![Page 14: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/14.jpg)
Suggerimenti
• Installare python-software-properties $ sudo aptitude install \
python-software-properties
Percorso 5 Configurazione 14
![Page 15: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/15.jpg)
add-apt-repository
• Aggiungere un repository – add-apt-repository 'deb uri distribution \
[component1] [component2] [...]'
– add-apt-repository ppa:<ppa_name>
• Esempi: – add-apt-repository
'deb http://packages.linuxmint.com/ julia main'
– add-apt-repository ppa:gnome-desktop
Percorso 5 Configurazione 15
![Page 16: SSH base - Configurazione di sistema da terminale](https://reader031.vdocuments.net/reader031/viewer/2022020207/559487dd1a28ab027d8b4579/html5/thumbnails/16.jpg)
These slides are licensed under a Creative Commons
Attribution Non Commercial
Share Alike 4.0 International
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/
Versione in Italiano:
https://creativecommons.org/licenses/by-nc-sa/4.0/deed.it