centos6 ssh + myentunnel + 浏览器代理

问题:在韩国的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
    评论
Centos7与VSCode的集成环境配置可以参考以下几个步骤: 1. 首先,确保你已经在Centos7上安装了VSCode。可以通过下载安装包或者使用命令行安装来完成这一步骤。 2. 打开VSCode后,点击左侧的扩展图标(四个方块)。在搜索框中输入"Centos7",找到并安装Centos7相关的插件。这些插件可以帮助你在VSCode中进行Centos7开发环境的配置和管理。 3. 接下来,你可以创建一个Centos7的工作区。在VSCode的顶部菜单中选择"文件",然后点击"添加文件夹到工作区"。选择你要添加的Centos7项目所在的文件夹,并点击"添加"。 4. 现在,在工作区中创建一个新的文件,在该文件中编写你的Centos7代码。你可以使用C或C++语言来编写代码。 5. 在VSCode的底部状态栏中,你可以选择编译和运行你的Centos7代码。点击"终端"图标,然后选择"新终端"。在终端中,你可以使用gcc或g++编译你的代码,并运行生成的可执行文件。 6. 如果你需要使用第三方库,比如muduo,你可以在项目的配置文件中添加相应的依赖项。具体的操作可以参考该库的官方文档或者示例代码。 7. 最后,你可以使用VSCode提供的调试功能来调试你的Centos7代码。点击左侧的调试图标(虫子),然后点击"创建一个启动配置"。根据你的项目类型和需求,选择相应的调试配置,并进行相应的设置。 通过以上步骤,你就可以在Centos7上使用VSCode进行开发和调试了。希望对你有帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [linux+centos7 +vscode+C++11+muduo示例](https://download.csdn.net/download/huangdecai2/11975118)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Chapter000 GO语言环境搭建(附Windows10+Centos7+Vscode+Goland)](https://download.csdn.net/download/weixin_38710566/14041283)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [华为数据库openGauss2.0安装指南实操篇(CentOS、openEuler篇)](https://download.csdn.net/download/karlch/88226492)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

王十一x

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

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

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

打赏作者

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

抵扣说明:

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

余额充值