A voir également:
- Transférer Dossier de Serveur1 à Serveur2
- Dossier appdata - Guide
- Mettre un mot de passe sur un dossier - Guide
- Impossible de supprimer un dossier - Guide
- Dossier rar - Guide
- Dossier démarrage - Guide
8 réponses
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 897
5 mai 2008 à 18:26
5 mai 2008 à 18:26
Salut,
Tu tapes cette commandes à partir d'où ?
Tu tapes cette commandes à partir d'où ?
lami20j
Messages postés
21331
Date d'inscription
jeudi 4 novembre 2004
Statut
Modérateur, Contributeur sécurité
Dernière intervention
30 octobre 2019
3 569
5 mai 2008 à 18:27
5 mai 2008 à 18:27
Salut,
essaie
essaie
ssh -v Login1@Serveur1 scp -v Chemin1/NomFichier1 Login2@Serveur2:Chemin2/NomFichier2
lami20j
Messages postés
21331
Date d'inscription
jeudi 4 novembre 2004
Statut
Modérateur, Contributeur sécurité
Dernière intervention
30 octobre 2019
3 569
5 mai 2008 à 18:29
5 mai 2008 à 18:29
depuis Putty via ssh !
Sinon tu peux faire en 2 étapes
la connexion
Sinon tu peux faire en 2 étapes
la connexion
ssh -v Login1@Serveur1et ensuite la copie
scp -v Chemin1/NomFichier1 Login2@Serveur2:Chemin2/NomFichier2
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 897
5 mai 2008 à 18:29
5 mai 2008 à 18:29
Il te faut d'abord te loguer sur un serveur et ensuite taper ta commande comme te l'as suggéré lami20j dans le message précédent ;-))
lami20j
Messages postés
21331
Date d'inscription
jeudi 4 novembre 2004
Statut
Modérateur, Contributeur sécurité
Dernière intervention
30 octobre 2019
3 569
5 mai 2008 à 18:30
5 mai 2008 à 18:30
en fait je n'ai jamais tester mais la 1ère commande c'est dans l'idée d'exécuter une commande distante grâce à ssh ;-)
normalement ça doit marcher ;-))
normalement ça doit marcher ;-))
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Voila j'ai tester voici ce que j'ai taper et ce que sa ma répondu :
[guyanezi@ks353727 guyanezi]$ ssh -v guyanezi@91.121.98.174 scp /home/guyanezi/test2.txt guyanezi@guyanezik.com:/home/guyanezi/
OpenSSH_4.4p1, OpenSSL 0.9.6m [engine] 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 91.121.98.174 [91.121.98.174] port 22.
debug1: Connection established.
debug1: identity file /home/guyanezi/.ssh/identity type -1
debug1: identity file /home/guyanezi/.ssh/id_rsa type -1
debug1: identity file /home/guyanezi/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.4
debug1: match: OpenSSH_4.4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '91.121.98.174' is known and matches the RSA host key.
debug1: Found key in /home/guyanezi/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/guyanezi/.ssh/identity
debug1: Trying private key: /home/guyanezi/.ssh/id_rsa
debug1: Trying private key: /home/guyanezi/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp /home/guyanezi/test2.txt guyanezi@guyanezik.com:/home/guyanezi/
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
lost connection
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 7.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 1
[guyanezi@ks353727 guyanezi]$
[guyanezi@ks353727 guyanezi]$ ssh -v guyanezi@91.121.98.174 scp /home/guyanezi/test2.txt guyanezi@guyanezik.com:/home/guyanezi/
OpenSSH_4.4p1, OpenSSL 0.9.6m [engine] 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 91.121.98.174 [91.121.98.174] port 22.
debug1: Connection established.
debug1: identity file /home/guyanezi/.ssh/identity type -1
debug1: identity file /home/guyanezi/.ssh/id_rsa type -1
debug1: identity file /home/guyanezi/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.4
debug1: match: OpenSSH_4.4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '91.121.98.174' is known and matches the RSA host key.
debug1: Found key in /home/guyanezi/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/guyanezi/.ssh/identity
debug1: Trying private key: /home/guyanezi/.ssh/id_rsa
debug1: Trying private key: /home/guyanezi/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp /home/guyanezi/test2.txt guyanezi@guyanezik.com:/home/guyanezi/
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
lost connection
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 7.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 1
[guyanezi@ks353727 guyanezi]$
lami20j
Messages postés
21331
Date d'inscription
jeudi 4 novembre 2004
Statut
Modérateur, Contributeur sécurité
Dernière intervention
30 octobre 2019
3 569
5 mai 2008 à 18:56
5 mai 2008 à 18:56
Oups, j'ai oublié que tu dois taper le mot de passe pour scp ;-)
Alors fait comme ça pour te connecter sur le serveur 1
Alors fait comme ça pour te connecter sur le serveur 1
ssh -v guyanezi@91.121.98.174et ensuite depuis le serveur 1 tu copies sur le serveur 2
scp -v /home/guyanezi/test2.txt guyanezi@guyanezik.com:/home/guyanezi/
[guyanezi@ks353727 guyanezi]$ scp -v /home/guyanezi/test2.txt guyanezi@guyanezik.com:/home/guyanezi/www/
Executing: program /usr/bin/ssh host guyanezik.com, user guyanezi, command scp -v -t /home/guyanezi/www/
OpenSSH_4.4p1, OpenSSL 0.9.6m [engine] 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to guyanezik.com [91.121.98.174] port 22.
debug1: Connection established.
debug1: identity file /home/guyanezi/.ssh/identity type -1
debug1: identity file /home/guyanezi/.ssh/id_rsa type -1
debug1: identity file /home/guyanezi/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.4
debug1: match: OpenSSH_4.4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'guyanezik.com' is known and matches the RSA host key.
debug1: Found key in /home/guyanezi/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/guyanezi/.ssh/identity
debug1: Trying private key: /home/guyanezi/.ssh/id_rsa
debug1: Trying private key: /home/guyanezi/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t /home/guyanezi/www/
Sending file modes: C0644 21 test2.txt
Sink: C0644 21 test2.txt
test2.txt 100% 21 0.0KB/s 00:00
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
Apparement on aurais dit que sa a transférer le fichier mais je le retrouve pas sur mon serveur ! par contre il a créer un dossier .ssh sur le serveur ou le fichier devait arrivé ! avec un fichier known.host qui contient ceci :
s
guyanezik.com,91.121.98.174 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAy602f3gLyWmIOPWO7vbTOaeVMbtdWgeRgwgo0m49cb+S/tGDpfdbc99COiT4B/1RvRjJ1J1ATiWPSHaTuD815Giuy5+xhMA8ZLEK1467bLXDEKC7BjJFib5FGC4xu2vg3hKeGt0omtaWh0QBWTgDZUx/hzsWGP+yOK76D4XigT0Y8epXw6Y0cR+ZrpNEEXBPKXv4LfnObSExvgB7pXdOlQDLaWVx9/YEce/8KlIaQqxOx/yyJMWdczkL+QbPhjz3LrHuqI5FSW+h7OhN6K8szT8I4I......
je ne copie pas tous le crypt ne sachant pas si c confidentiel !.
Executing: program /usr/bin/ssh host guyanezik.com, user guyanezi, command scp -v -t /home/guyanezi/www/
OpenSSH_4.4p1, OpenSSL 0.9.6m [engine] 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to guyanezik.com [91.121.98.174] port 22.
debug1: Connection established.
debug1: identity file /home/guyanezi/.ssh/identity type -1
debug1: identity file /home/guyanezi/.ssh/id_rsa type -1
debug1: identity file /home/guyanezi/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.4
debug1: match: OpenSSH_4.4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'guyanezik.com' is known and matches the RSA host key.
debug1: Found key in /home/guyanezi/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/guyanezi/.ssh/identity
debug1: Trying private key: /home/guyanezi/.ssh/id_rsa
debug1: Trying private key: /home/guyanezi/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t /home/guyanezi/www/
Sending file modes: C0644 21 test2.txt
Sink: C0644 21 test2.txt
test2.txt 100% 21 0.0KB/s 00:00
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
Apparement on aurais dit que sa a transférer le fichier mais je le retrouve pas sur mon serveur ! par contre il a créer un dossier .ssh sur le serveur ou le fichier devait arrivé ! avec un fichier known.host qui contient ceci :
s
guyanezik.com,91.121.98.174 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAy602f3gLyWmIOPWO7vbTOaeVMbtdWgeRgwgo0m49cb+S/tGDpfdbc99COiT4B/1RvRjJ1J1ATiWPSHaTuD815Giuy5+xhMA8ZLEK1467bLXDEKC7BjJFib5FGC4xu2vg3hKeGt0omtaWh0QBWTgDZUx/hzsWGP+yOK76D4XigT0Y8epXw6Y0cR+ZrpNEEXBPKXv4LfnObSExvgB7pXdOlQDLaWVx9/YEce/8KlIaQqxOx/yyJMWdczkL+QbPhjz3LrHuqI5FSW+h7OhN6K8szT8I4I......
je ne copie pas tous le crypt ne sachant pas si c confidentiel !.
5 mai 2008 à 18:27