Skip to content

About

Mix the examples of Golang SFTP + SSH

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

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 .

About

Mix the examples of Golang SFTP + SSH

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址