ubuntu安装开启ssh

-- 安装 ssh
sudo apt-get install openssh-server

-- 启动
sudo /etc/init.d/ssh start

--查看ssh进程信息(看到sshd,说明ssh-server成功启动)
 ps -ef|grep ssh
hqq       2006  1971  0 18:51 ?        00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session gnome-session --session=ubuntu
root      3622     1  0 19:44 ?        00:00:00 /usr/sbin/sshd -D
hqq       4226  2662  0 20:48 pts/1    00:00:00 grep --color=auto ssh

-- 查看本机ip
ifonfig

--查看 ssh-server 端口(找到里面的port部分,一般默认22)
vi /etc/ssh/sshd_config

猜你喜欢

转载自huangqiqing123.iteye.com/blog/2183275