25-03-2025
This commit is contained in:
@@ -28,12 +28,24 @@ bruno@macbook-pro:~$ sudo chmod 755 ~/.ssh
|
||||
|
||||
|
||||
|
||||
#### Copier un fichier:
|
||||
#### Copier un fichier depuis le serveur:
|
||||
|
||||
```bash
|
||||
macbook-pro:~ bruno$ ssh root@192.168.1.8 "cat prefs.tar.gz"> prefs.tar.gz
|
||||
```
|
||||
|
||||
```bash
|
||||
$ ssh pihole1 "cat update_pihole.sh"> update_pihole_pi1.sh
|
||||
$ ssh pihole2 "cat update_pihole.sh"> update_pihole_pi2.sh
|
||||
```
|
||||
|
||||
#### Envoyer un fichier sur le serveur:
|
||||
|
||||
```bash
|
||||
$ cat update_pihole_pi1.sh | ssh pihole1 'cat > update_pihole.sh'
|
||||
$ cat update_pihole_pi2.sh | ssh pihole2 'cat > update_pihole.sh'
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Exécuter une (ou plusieurs) commande sur un serveur distant:
|
||||
|
||||
Reference in New Issue
Block a user