指定端口登录:
ssh root@127.0.0.1 port
Ubuntu ssh服务
ssh由openssh-client和openssh-server程序组成.
openssh-client负责连接其它的机器
openssh-server提供ssh服务
查看该服务是否安装:
dpkg -l | grep ssh
安装openssh-server:
apt-get install openssh-server -y
查看ssh是否启动:
ps -e | grep ssh
启动ssh:
/etc/init.d/ssh start | service ssh start
ssh相关目录:
/etc/ssh/
FAQ
Ubuntu的root账户无法登陆SSH-Permission denied
修改ssh的配置文件 /etc/ssh/sshd_config
#Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes
#修改为
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
重启ssh
