1.查看是否安装SSH ps -e|grep ssh 输出中含有sshd表示server启动
如果什么都没有请继续安装openssh sudo apt-get install openssh-server
在敲入这一指令后报错:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable),这意味着其他进程正在使用,重启虚拟机系统即可
sudo apt-get install openssh-client 在敲入这一条指令后提示:openssh-client set to manually installed. apt-get得到安装包默认目录为/var/cache/apt/archives 在目录下找到openssh-client安装包手动安装 deb文件: sudo dpkg -i 安装包名字 rpm文件: sudo rpm -ivh 安装包名字
1.安装SSH Secure Shell 2.连接ubuntu虚拟机
但是在连接时抛出一下错误 原因是加密方式不一致,在ubuntu虚拟机上做一下操作即可解决 (1)sudo gedit /etc/ssh/sshd_config (2)往文本中添加以下内容并保存 Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org
(3)重启sshd服务 service ssh restart
重新连接就能够访问啦!!!!!!!!
新闻热点
疑难解答