linux 更改ssh密码_如何通过SSH更改Linux帐户密码:初学者教程

linux 更改ssh密码

People are sometimes given access to Linux/Unix and asked to change their initial passwords. But for beginners, changing a Linux/Unix password is not an easy task, especially when there is only SSH log on allowed to the Linux/Unix server. This post introduces how to change password of user USER on host HOST remotely using SSH.

人们有时会被授予访问Linux / Unix的权限,并被要求更改其初始密码。 但是对于初学者而言,更改Linux / Unix密码并非易事,尤其是在仅允许SSH登录Linux / Unix服务器的情况下。 这篇文章介绍了如何使用SSH在主机HOST上远程更改用户USER的密码。

Steps are as follows. Note: you will need to replace HOST and USER with the actual username and hostname you are using.

步骤如下。 注意:您将需要用实际使用的用户名和主机名替换HOST和USER。

步骤1.以USER身份登录HOST。 (Step 1. Log on the HOST as USER.)

On Linux and Mac OS X, open a terminal and run

在Linux和Mac OS X上,打开终端并运行

ssh USER@HOST

If it asks whether your are continuing connecting if you do this for the first time, you can enter "yes" to continue.

如果它询问您是否是第一次继续进行连接,则可以输入“是”继续。

It will display

它将显示

USER@HOST's password:

You will need to enter the password. You can’t see what you have entered here.

您将需要输入密码。 您在这里看不到输入的内容。

步骤2.更改密码 (Step 2. Change the password)

In side of the SSH login, run

在SSH登录名旁边,运行

passwd

It will display

它将显示

Changing password for user USER.
Changing password for USER.
(current) UNIX password:

Enter your old password here. You can’t see what you have entred too.

在此输入您的旧密码。 您也看不到输入的内容。

It will then display

然后将显示

New password:

Enter new password. It will then display

输入新密码。 然后将显示

Retype new password:

Enter new password again

再次输入新密码

If you see

如果你看到

passwd: all authentication tokens updated successfully.

or

要么

passwd: password updated successfully.

第三步 退出SSH会话 (Step3. Exit the SSH session)

You can exit the SSH session by running

您可以通过运行退出SSH会话

exit

翻译自: https://www.systutorials.com/change-linux-account-password-ssh-beginers-tutorials/

linux 更改ssh密码

  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值