Bonjour,

Le bin bash ouvre une connexion ssh

J'utilise ceci :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
scp -r -p home/../fic.php root2@ip_local:/media/air-ubuntu/af9efb81-4655-4305-879f-42ff146c11bd/manu
Il faut exécuter la commande manuelle.
Comment l'intéger dans le bin bash ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
#!/bin/bash
sshpass -p "pass" ssh -o StrictHostKeyChecking=no root1@ip_dist
 
scp -r -p home/../fic.php root2@ip_local:/media/air-ubuntu/af9efb81-4655-4305-879f-42ff146c11bd/manu
 
# 
exit 0

@+