远程访问服务器tensorboard的方法

来源:互联网 发布:java 微信 signature 编辑:程序博客网 时间:2024/05/16 09:55

ref: http://blog.csdn.net/silent56_th/article/details/69367446?utm_source=itdadao&utm_medium=referral
参考以上链接完成,主要是第一种情况:客户端位于外网
此种情况下,服务器可以通过IP地址寻址客户端,所以在服务器端建立与客户端的反向链接。通过-N -f后台运行。具体命令为:

在服务器主机上执行:ssh -f -NR <client_port>:localhost:<server_port> [username@]<client_ip_address>例:ssh -f -NR 16006:localhost:6006 [username@]<client_ip_address>在客户端浏览器中输入:0.0.0.0:16006

如果输入ssh localhost遇到以下错误:connect to host localhost port 22: Connection refused
则是没有安装openssh-server,执行:

sudo apt-get update
sudo apt-get install openssh-server

查看ssh是否启动:
ps -f | grep ssh
若没有启动,则需手动sudo /etc/init.d/ssh start

另外一个的问题:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 RSA key sent by the remote host is
6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.
Please contact your system administrator.
Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:4
RSA host key for pong has changed and you have requested strict checking.
Host key verification failed.

解决方案:ssh-keygen -R host_id

原创粉丝点击