ubuntu 安装ssh

1.确认是否安装了SSH client和SSH server,如果只是访问其他人,则只用安装client,如果想远程登录主机,则需要安装server,命令如下:

$:sudo apt-get install openssh-client

$:sudo apt-get install openssh-server

2.确认是否启动ssh

ps -e |grep ssh

看到:

 1782 ?        00:00:00 ssh-agent

 2222 ?        00:00:00 sshd

则server和client启动正常,否则
$:sudo /etc/init.d/ssh start
3.ssh-server配置文件位于/ etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务:

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

4.采用:

ssh username@IpAddress就可以远程登录了,登录工具可以用Security CRT。

你可能感兴趣的:(Security,ubuntu,ssh)