《转》ubuntu下如何安装使用SSH?
来源:互联网 发布:mac克隆地址是什么意思 编辑:程序博客网 时间:2024/06/08 05:15
ubuntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server。判断是否安装ssh服务,可以通过如下命令进行:
查看是否安装了ssh服务:
xjj@xjj-desktop:~$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
如上所示,表示没有还没有安装,可以通过apt安装
安装ssh服务:
命令如下:
-desktop:~$ sudo apt-get install openssh-server
xjj@xjj-desktop:~$ sudo apt-get install openssh-server //我的到这一步就可以连接了
系统将自动进行安装,安装完成以后,先启动服务:
@xjj-desktop:~$ sudo /etc/init.d/ssh start
xjj@xjj-desktop:~$ sudo /etc/init.d/ssh start
启动后,可以通过如下命令查看服务是否正确启动
@xjj-desktop:~$ ps -e|grep ssh
6212 ? 00:00:00 sshd
xjj@xjj-desktop:~$ ps -e|grep ssh 6212 ? 00:00:00 sshd
如上表示启动ok。
改端口:
注意,ssh默认的端口是22,可以更改端口,更改后先stop,
然后start就可以了。改配置在/etc/ssh/sshd_config下,如下所示。
xjj@xjj-desktop:~$ vi /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
Port 22
最后,应该是连接的时候了。请看如下命令:
xjj@xjj-desktop:~$ ssh exceljava@192.168.158.129
xjj@xjj-desktop:~$ vi /etc/ssh/sshd_config
转自:http://os.51cto.com/art/201109/291634.htm
- 《转》ubuntu下如何安装使用SSH?
- ubuntu下如何安装使用SSH
- ubuntu下如何安装使用SSH?
- ubuntu下如何安装使用SSH
- ubuntu下如何安装使用SSH?
- ubuntu下如何安装使用SSH?
- ubuntu下如何安装使用SSH?
- ubuntu下如何安装使用SSH
- ubuntu下如何安装使用SSH
- ubuntu下如何安装使用SSH
- Ubuntu 下如何使用 SSH Tunneling Proxy ?
- Ubuntu 如何安装ssh
- Ubuntu下安装ssh
- Ubuntu 下安装 SSH
- ubuntu下安装ssh
- ubuntu下安装ssh
- Ubuntu下安装SSH
- Ubuntu下安装ssh
- word 转换成pdf
- 如何开始设计手机应用
- 德国研究 LED灯泡替代WiFi实现高速无线传输
- [读书笔记]A Programmer's Guide to Data Mining - chapter 1 Introduction
- JSP 语法基础
- 《转》ubuntu下如何安装使用SSH?
- Altium Designer 6.0的原理图中解决off grid的Warning
- PL/SQL Developer启动时报错:“Control 'dxDockBrowserPanel' has no parent window"
- poj1655Balancing Act 树的重心,树形dp
- Lucene2.3 sort过程简单总结(返回Hits对象)
- 我的知识来源整理
- Croc Champ 2013 - Round 2 (Div. 2 Edition)--C 字符串处理
- 8-1 实现复数类中的运算符重载
- C#操作word的版本问题(读注册表+反射)