Ubuntu系统安装之后的配置
1更新vim
$sudo apt-get remove vim-common
$sudo apt-get install vim
如果报错无法获得锁,使用
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
2安装sshd远程访问服务器
$sudo apt-get install openssh-server
$sudo /etc/init.d/ssh restart
成功后:[ ok ] Restarting ssh (via systemctl): ssh.service.
修改配置文件/etc/ssh/sshd-config
$sudo vim /etc/ssh/sshd-config
注意config前面是下划线,不是中间,输入法的锅。
相关修改
PermitRootLogin no->yes
PubkeyAuthentication yes->no
AuthorizedKeysFile .ssh/ authorized_keys #屏蔽掉
PasswordAuthentication no->yes
之后
service ssh start
成功之后就可以使用远程访问输入指令
我使用的xshell,或者crt都可。之后输入指令更加方便。