From ca1b83d26e73b6cbdf9a67392edc734308516cf3 Mon Sep 17 00:00:00 2001 From: manojampalam Date: Tue, 13 Oct 2015 15:10:43 -0700 Subject: [PATCH] Updated Running sftp and sftpserver (markdown) --- Running-sftp-and-sftpserver.md | 30 ------------------------------ sftp.exe-examples.md | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 30 deletions(-) delete mode 100644 Running-sftp-and-sftpserver.md create mode 100644 sftp.exe-examples.md diff --git a/Running-sftp-and-sftpserver.md b/Running-sftp-and-sftpserver.md deleted file mode 100644 index d9a2d05..0000000 --- a/Running-sftp-and-sftpserver.md +++ /dev/null @@ -1,30 +0,0 @@ - -• _SFTP client needs ssh client and SFTP server uses sshd server. So first setup ssh client and server using the wiki instructions "Running SSH and SSHD"._ - - -## Setup sftp-server -* stop the sshd server by doing steps like "net stop openssh" -* Add location of sftp-server.exe binary as a subsystem in sshd_config file by adding an entry like below: - - `Subsystem sftp /win32openssh/bin/sftp-server.exe` - -* start the sshd server by doing steps like "net start openssh" -* 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` - diff --git a/sftp.exe-examples.md b/sftp.exe-examples.md new file mode 100644 index 0000000..8bd12b6 --- /dev/null +++ b/sftp.exe-examples.md @@ -0,0 +1,16 @@ +1. Setup sftp-server on host + * Add location of sftp-server.exe binary as a subsystem in sshd_config file by adding an entry like below: + * `Subsystem sftp d:\win32openssh\sftp-server.exe` + * Restart sshd.exe + * sftp-server will now be started automatically by sshd server when a sftp client connects to this computer + +2. sftp.exe examples + * `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` +