firesnow

在ubuntu中简单安装运行SSH服务。

SSH程序有客户端openssh-client和服务端openssh-server

想登陆别的电脑SSH,只需安装openssh-client,ubuntu有默认安装。

安装openssh-client:

sudo apt-get install openssh-client

要让本机开放SSH服务就需要安装openssh-server:

sudo apt-get install openssh-server

查看sshserver是否运行:

ps -e |grep ssh

运行sshserver:

sudo /etc/init.d/ssh start

ssh-server配置文件位于/etc/ssh/sshd_config,可以自定义SSH的服务端口。
默认端口是22,自定义端口后需重启SSH服务:

sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start

登陆SSH:

ssh username@localhost

username为localhost机器上的用户,需要输入密码。

断开连接:

exit

 

分类:

技术点:

相关文章:

  • 2021-10-19
  • 2021-10-19
  • 2021-10-19
  • 2021-10-19
  • 2022-01-18
  • 2021-10-19
  • 2021-10-19
  • 2021-10-19
猜你喜欢
  • 2021-10-19
  • 2021-10-19
  • 2021-08-18
  • 2022-12-23
  • 2021-10-29
  • 2021-10-03
  • 2021-10-19
相关资源
相似解决方案