标签:
http://bbs.pinggu.org/thread-3164833-1-1.html
1, ssh: connect to host localhost port 22: Connection refused
出现这个问题,一般是因为ssh服务安装或者启动,
Ubuntu下安装ssh:sudo apt-get install openssh-server
Fedora下安装ssh:yum install openssh-server
- 查看是否安装
[jxwu@master java]$ rpm -qa | grep "ssh"
libssh2-1.4.3-10.fc20.x86_64
openssh-clients-6.4p1-6.fc20.x86_64
openssh-server-6.4p1-6.fc20.x86_64
openssh-6.4p1-6.fc20.x86_64
- 查看服务是否启动
[jxwu@master java]$ ps -e | grep "ssh"
23419 ? 00:00:00 sshd
systemctl enable sshd.service
2, 更改主机名称
对于fedora13版本,
# vi /etc/sysconfig/network文件中的 HOSTNAME 子段
对于fedora20版本,
# vi /ect/hostname
3, 更改hosts去解析主机名
# vi /etc/hosts
4, 关闭防火墙
service iptables stop
标签:
原文地址:http://www.cnblogs.com/binglexu/p/4173436.html