Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/aysf/go-sftp-example

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/aysf/go-sftp-example

  • v0.0.0-20220713190524-ec2347a84741
  • Source
  • Go
  • Socket score

Version published
Created
Source

Example of SFTP + SSH in Golang

This snippet is for sftp connection combined from the example of Golang package:

Usage

  1. Clone this repository
  2. Setup your sftp server
  3. Adjust these variables with your own environment
	hostInput       = "127.0.0.1"               // host of ssh server
	portInput       = "22"                      // port of sftp server
	userInput       = "anan"                    // name of user on the ssh server
	passInput       = "yourcustompassword"      // password for the user on the ssh server
	pathInput       = "/home/user"              // path of sftp folder
	privateKeyInput = "/Users/user/.ssh/id_rsa" // path to client private key
	publicKeyInput  = "known_hosts"             // path to known_hosts where server public key is stored
  1. go to project folder and run go run .

FAQs

Package last updated on 13 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc