centos6 ssh + myentunnel + 浏览器代理

文章讲述了在韩国的ESXi环境中,尝试将虚机迁移到爱快的过程中遇到OpenSSH版本不兼容的问题,通过降低OpenSSH版本、配置MyEntunnel和浏览器代理设置来解决该问题的过程。
摘要由CSDN通过智能技术生成

问题:在韩国的esxi中的虚机,需要迁移到爱快中。

过程:导出vmdk后,导入爱快虚机一直报错,不能正常导入。

直接在爱快中新装centos7版本。进行安装调试,还是报错。

[17:42:08 03/12] plink.exe: Looking up host "xxxxxxxxx"

[17:42:08 03/12] plink.exe: Connecting to xxxxxxxx port 65123

[17:42:08 03/12] plink.exe: We claim version: SSH-2.0-PuTTY_Snapshot_2010_04_04:r8911

[17:42:08 03/12] plink.exe: Server version: SSH-2.0-OpenSSH_7.4

[17:42:08 03/12] plink.exe: Using SSH protocol version 2

[17:42:08 03/12] plink.exe: Doing Diffie-Hellman group exchange

定位到了问题,是 openssh 版本太高。

尝试降级。但是问题不断。 放弃。

直接重新开始

一、再次尝试新装 centos 6.10 版本

新建用户 dlvpn 用了最小权限

groupadd dlvpn

useradd -d /home/dlvpn -m -g dlvpn -s /bin/false dlvpn

设置密码

passwd dlvpn

查看防火墙状态

service iptables status

把防火墙关闭

service iptables stop

永久禁用防火墙

chkconfig iptables off

设置 selinux 为 disabled

vi /etc/selinux/config

添加 65123 tcp udp 端口

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 65123 -j ACCEPT

iptables -A INPUT -p udp -m state --state NEW -m udp --dport 65123 -j ACCEPT

编辑 sshd 文件

vi /etc/ssh/sshd_config

#    $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

Port 65123
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile    .ssh/authorized_keys
#AuthorizedKeysCommand none
#AuthorizedKeysCommandRunAs nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing, 
# and session processing. If this is enabled, PAM authentication will 
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
UsePAM yes

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem    sftp    /usr/libexec/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#    X11Forwarding no
#    AllowTcpForwarding no
#    ForceCommand cvs server

重新加载

/etc/init.d/sshd reload

二、MyEntunnel设置

首先了解一下MyEntunnel是啥:

MyEntunnel是一款用于建立并保持TCP SSH隧道的软件,相当于将SSH隧道链接根据SOCKS v5协议映射为本地服务器。

MyEntunnel官方首页:访问 (可以在这里下载到软件哦)

下载到软件后,运行软件,设置一下

MyEntunnel设置

设置完毕之后,就可以连接了,MyEntunnel的托盘图标变成绿色,说明SSH代理通道已经打开。可以在状态选项卡里面看到具体的日志。

三、浏览器设置

1. Firefox浏览器设置:

Firefox菜单——>选项——>高级——>连接——>设置

手动配置代理链接。

将socks主机填写为:127.0.0.1

端口:7070

同时协议设置为SOCKS v5

2. Chrome浏览器设置:

极力推荐使用SwitchyPlus插件

OK了

  • 25
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

王十一x

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值