家中电脑访问公司电脑

来源:互联网 发布:素数java程序 编辑:程序博客网 时间:2024/04/30 20:46

思路

在公司服务器上建立vpn server,然后将家中电脑,vpn server,公司电脑通过vpn组成局域网,这样既可访问

在公司服务器上安装vpn server

http://blog.csdn.net/dk_mcu/article/details/51150709

家里和公司电脑安装vpn client

http://blog.csdn.net/dk_mcu/article/details/51151210

公司电脑安装openssh

sudo apt-get install openssh

家中电脑链接公司电脑

➜  ssh compony@vpn-ip若出现如下报错--------------------------------------------------------@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the ECDSA key sent by the remote host is23:64:49:fb:bd:4b:1c:51:40:56:bf:07:98:43:38:6a.Please contact your system administrator.Add correct host key in /root/.ssh/known_hosts to get rid of this message.Offending ECDSA key in /root/.ssh/known_hosts:2  remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R 172.16.100.136ECDSA host key for 172.16.100.136 has changed and you have requested strict checking.Host key verification failed.--------------------------------------------------------➜  sudo rm ~/.ssh/known_hosts➜  ssh compony@vpn-ip
0 0