SSH Access server via HTTP proxy

Source: Internet
Author: User
Tags ssh access ssh server ssh config ssh config file

The key is the use of corkscrew

: http://agroman.net/corkscrew/

The following is reproduced

CentOS 7,root User

Install:get Corkscrew

Download:https://pkgs.org/download/corkscrew

Add Proxycommand to your SSH config file:

A configuration file for SSH already. It should are located in $HOME/.ssh/config and are a simple text file. Create one if it does not exist and add lines such as these to it:

Host *
Proxycommand corkscrew http-proxy.example.com 8080%h%p

... replacing http-proxy.example.com with the name or address of your HTTP proxies and possibly replacing 8080 with the port O n which the proxy listens, which may is or even some other port. The%h and%p would be replaced automatically by SSH with the actual destination host and port.

These-lines tell the SSH client-to-start another program (corkscrew), the actual connection to the SSH server. The Host * Line says, the This would be is done for all hosts. If you wish to restrict the "hosts for which" this would be do, you can put a limited form of regular expression there. See the Ssh_config (5) Mans page for more information. If you do not have corkscrew in your path or has put it in a non-standard location, your may specify an absolute path to co Rkscrew in so file as well.

Example

SSH [email protected]-P port
Scp-p port-r./test [Email protected]:/home/test/

From

https://www.mtu.net/~engstrom/ssh-proxy.php

SSH Access server via HTTP proxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.