首页 > 代码库 > ubuntu开启SSH服务
ubuntu开启SSH服务
SSH分客户端openssh-client和openssh-server
假设你仅仅是想登陆别的机器的SSH仅仅须要安装openssh-client(ubuntu有默认安装,假设没有则sudo apt-get install openssh-client),假设要使本机开放SSH服务就须要安装openssh-server
sudo apt-get install openssh-server
然后确认sshserver是否启动了:
ps -e |grep ssh
假设看到sshd那说明ssh-server已经启动了。
假设没有则能够这样启动:sudo /etc/init.d/ssh start
ssh-server配置文件位于/ etc/ssh/sshd_config,在这里能够定义SSH的服务port,默认port是22,你能够自定义成其它port号,如222。
然后重新启动SSH服务:
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
然后使用下面方式登陆SSH:
ssh username@192.168.1.200 username为192.168.1.200 机器上的用户,须要输入password。
假设你仅仅是想登陆别的机器的SSH仅仅须要安装openssh-client(ubuntu有默认安装,假设没有则sudo apt-get install openssh-client),假设要使本机开放SSH服务就须要安装openssh-server
sudo apt-get install openssh-server
然后确认sshserver是否启动了:
ps -e |grep ssh
假设看到sshd那说明ssh-server已经启动了。
假设没有则能够这样启动:sudo /etc/init.d/ssh start
ssh-server配置文件位于/ etc/ssh/sshd_config,在这里能够定义SSH的服务port,默认port是22,你能够自定义成其它port号,如222。
然后重新启动SSH服务:
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
然后使用下面方式登陆SSH:
ssh username@192.168.1.200 username为192.168.1.200 机器上的用户,须要输入password。
ubuntu开启SSH服务
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。