---
title: "使用SSH端口转发记录"
author: "name327"
date: "2015-10-01T21:43:24Z"
tags: []
categories: ["互联网"]
slug: "ssh"
draft: false
lastmod: "2016-07-21T22:13:34Z"
id: 2247086
url: "https://name327.iteye.com/blog/2247086"
---

```
ssh -oGSSAPIAuthentication=no -CNfgR 9366:127.0.0.1:22 root@1.1.1.1 -p 57986
```

 ssh -CfgNR 4001::4001 root@119.29.38.232 

打开 /etc/sysctl.conf

中的net.ipv4.ip\_forward = 1

/etc/ssh/sshd\_config

AllowTcpForwarding yes  允许端口转发

GatewayPorts yes 允许绑定在 0.0.0.0上监听端口