Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smithclay/faassh
simple go SSH server with reverse tunneling designed for running in cloud functions like AWS lambda
https://github.com/smithclay/faassh
aws-lambda cloud-functions ssh-server tunnel
Last synced: about 1 month ago
JSON representation
simple go SSH server with reverse tunneling designed for running in cloud functions like AWS lambda
- Host: GitHub
- URL: https://github.com/smithclay/faassh
- Owner: smithclay
- Created: 2017-04-04T19:41:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T22:46:56.000Z (over 5 years ago)
- Last Synced: 2024-08-02T06:23:23.802Z (4 months ago)
- Topics: aws-lambda, cloud-functions, ssh-server, tunnel
- Language: Go
- Homepage:
- Size: 118 KB
- Stars: 89
- Watchers: 4
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-network-stuff - **64**星
README
# faassh
### simple go SSH server designed for running in cloud functions![image](https://cloud.githubusercontent.com/assets/27153/25602411/819d0b02-2ea8-11e7-9f64-157226b2d4cb.png)
This is just for fun. It's a simple SSH server and tunnel-er that allows you to SSH into a running lambda function—until it times out.
Developed for my [dotScale](https://dotscale.io) 2017 talk, "Searching for the Server in Serverless". Slides [here](http://speakerdeck.com/smithclay/searching-for-the-server-in-serverless).
## building
This project uses the [Serverless Application Model](https://aws.amazon.com/serverless/sam/) for packaging and deploying.
```sh
$ sam build
$ sam package --s3-bucket > packaged.yaml
$ sam deploy --template-file packaged.yaml --stack-name --capabilities CAPABILITY_IAM
```## usage
```
faassh -i ./path_to_private_rsa_host_key -p port_number
```## example
See the example node.js lambda function in the `lambda/` directory.
* Generate RSA keys for the Lambda function and bundle inside the `lambda` directory (`ssh-keygen -t rsa -f ./id_rsa`)
* Set the envionment variables to point to your SSH jump host with the correct username.If you'd like to test it on your local laptop that's behind (hopefully) a NAT/firewall, I like the TCP forwarding available on [ngrok](https://ngrok.com/). You can create a tunnel to your local SSH server for the other end of the tunnel endpoint, you just run: `ngrok tcp 22`.
## other interesting/related projects
* [lambdash](https://github.com/alestic/lambdash) - another approach for running commands in Lambda
* [awslambdaproxy](https://github.com/dan-v/awslambdaproxy) - An AWS Lambda powered HTTP/SOCKS web proxy## todo
- better authentication support
- other cloud providers
- connection cleanup
- terraform/cloudformation helper
- multiple connections
- tests and docs :)