From d0699872bf841167a67bc1608758916cc05cb18b Mon Sep 17 00:00:00 2001 From: quamrulmina Date: Wed, 7 Oct 2015 15:28:56 -0500 Subject: [PATCH] Created Running sftp and sftpserver (markdown) --- Running-sftp-and-sftpserver.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Running-sftp-and-sftpserver.md diff --git a/Running-sftp-and-sftpserver.md b/Running-sftp-and-sftpserver.md new file mode 100644 index 0000000..f7ae53a --- /dev/null +++ b/Running-sftp-and-sftpserver.md @@ -0,0 +1,28 @@ + +• _SFTP client needs ssh client and SFTP server uses sshd server. So first setup ssh client and server using the wiki instructions._ + + +## # Setup sftp-server +1. stop the sshd server by doing steps like "net stop openssh" +2. Add location of sftp-server.exe binary as a subsystem in sshd_config file by adding entries like below: +`Subsystem sftp /win32openssh/bin/sftp-server.exe` +3. start the sshd server by doing steps like "net start openssh" +4. sftp-server will now be started automatically by sshd server when a sftp client connects to this computer + +## # run Sftp client +`sftp test1@localhost //login to local machine using test1 username` + +`sftp -i .ssh/id_rsa test1@remotehost //login using .ssh/id_rsa public key pair` + +`pwd //show current remote directory` + +`lpwd //show current local directory` + +`cd /tests //changed to remote directory c:/tests` + +`get file1.txt //download file1.txt from remote system to local directory` + +`put file1.txt //upload the file to remote system from the current local directory` + +`exit` +