本文介绍了在 ubuntu 操作系统上设置或重用 ssh 密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在装有 Ubuntu 操作系统的 PC 上的一台 Linux 机器上重用我现有的 ssh 密钥,我正在尝试在 Ubuntu 操作系统 PC 上访问 gerrit,并且需要建立预期的 ssh 连接.

Is there a way to reuse my existing ssh key on one linux machine on a PC with Ubuntu OS,am trying to access gerrit on a Ubuntu OS PC and as expected ssh connection needs to be established.

我不想使用我的电子邮件 ID 生成新的 ssh 密钥,因为它可能会破坏我当前的 ssh 连接,如何继续?任何输入

I don’t want to run generate a new ssh key with my email id as it might mess-up my current ssh connection, how to proceed forward? any inputs

谢谢

推荐答案

您可以将旧的 ssh 密钥复制到新机器上.

You can copy your older ssh keys to the new machine.

基本上,将您的 ~/.ssh/id_rsa~/.ssh/id_rsa.pub 文件复制到同一位置的这台新机器上,您应该能够ssh 没问题.您可能需要明确指定要 ssh 进入的用户帐户,例如 ssh user@server.

Basically, copy your ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub files to this new machine at same location, and you should be able to ssh in all right. You might need to explicitly specify the user account you want to ssh into like ssh user@server.

此外,您可能还想了解有关重用 ssh 密钥的更多答案.

Also, you might want to go through more answers on reusing ssh keys.

这篇关于在 ubuntu 操作系统上设置或重用 ssh 密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 07:21