OVH Community, votre nouvel espace communautaire.

Comment récuperer son ssh


bbr18
16/12/2014, 14h22
en raid c'est md, pas sd dans ta commande
et c'est du gtp donc à la place de fdisk -l tu fais :
parted -l

E-d0u@rd
16/12/2014, 13h40
Bonjour,

Tes disques sont en raid non ?

Que donne:

Code:
cat /proc/mdstat
Ed

claire34
15/12/2014, 19h45
lol oui c'est vrai

Code:
root@rescue:~# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  3907029167  1953514583+  ee  GPT

Disk /dev/md5: 209.7 GB, 209713037312 bytes
2 heads, 4 sectors/track, 51199472 cylinders, total 409595776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md5 doesn't contain a valid partition table

Disk /dev/md4: 1580.4 GB, 1580427313152 bytes
2 heads, 4 sectors/track, 385846512 cylinders, total 3086772096 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md4 doesn't contain a valid partition table

Disk /dev/md3: 104.9 GB, 104856485888 bytes
2 heads, 4 sectors/track, 25599728 cylinders, total 204797824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md3 doesn't contain a valid partition table

Disk /dev/md2: 104.9 GB, 104856485888 bytes
2 heads, 4 sectors/track, 25599728 cylinders, total 204797824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table
Et si je tente un:

Code:
mount /dev/sda1 /mnt/
J'obtiens ceci:

Code:
mount: block device /dev/sda1 is write-protected, mounting read-only
NTFS signature is missing.
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

bbr18
15/12/2014, 19h41
montre le fdisk -l si tu veux que quelqu'un t'aide ^^

claire34
15/12/2014, 19h29
Alors j'ai pu supprimer la clé et me connecter en rescue.

J'ai suivi ce tuto: https://www.ovh.com/fr/g920.rescue_mode
Puis j'ai fais un fdisk -l

Je n'ai pas d'étoile pour savoir quel disque monter :s

bbr18
15/12/2014, 19h04
efface ta clé ou installe un jeu de clés sur le manager puis demande le reboot en rescue en utilisant la clé (il faut la mettre par défaut quand tu la crées)

claire34
15/12/2014, 18h30
Bonsoir,

je mettais en place des sécurités via ssh (bloquer l'acces à root au serveur, utiliser qu'un seul utilisateur à se connecter en ssh) puis j'ai du faire une gaffe.
Depuis je ne peux plus me connecter en ssh:

Code:
ssh: connect to host x.xxx.xx.xxx port 22: Operation timed out
Y a t-il un moyen de récupérer un accès ssh ? Parce que là je suis bien embetée...

Edit: j'ai essayé en mode recue et j'ai ceci:

Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xxxxxxxxxxxxxxxxxxx
Please contact your system administrator.
Add correct host key in /Users/claire/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/claire/.ssh/known_hosts:4
RSA host key for X.XXX.XX.XXX has changed and you have requested strict checking.



Merci par avance