作为免费用户,你可以申请2个免费实例。当一个公钥发生问题后,可以用一下方式来进行替换。
首先用密钥生成软件,如Putty。生成密钥对。
A服务器是无法登陆的服务器,需要换密钥。
B服务器是可以登陆的服务器。
1)A服务器 – 停止 – 分离引导盘。
2)B服务器 – 附加存储卷 。记录下链接和分离的iSCSI命令,后面要用到。
3)登陆B服务器,执行挂载命令iSCSI命令。
4)查看磁盘挂载情况。
fdisk -l
找到需要加载的区,一般是/dev/sdb3
5)挂载sdb3 到 /mnt
mount /dev/sdb3 /mnt
如果报错
wrong fs type, bad option, bad superblock on /dev/sdb3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so.
输入以下命令
mount -o nouuid /dev/sdb3 /mnt
应该就可以挂载成功。
6)查看/mnt,应该就有内容。
ls /mnt
7) 修改密钥文件
这里修改的系统是centos,用户名是opc
vim /mnt/home/opc/.ssh/authorized_keys
接下来删除所有老的公钥文字,替换上新生成的公钥。保存关闭文件。
8)修改成功后,取消磁盘挂载!
cd / umount /mnt
9)执行之前保存的分离iSCSI
10)回到实例操作界面,将B服务器的附加卷分离。在A服务器上引导卷进行附加。
11)重启A服务器
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
These cookies are needed for adding comments on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com
You can find more information in our Cookie Policy and Cookie Policy.