Re: sftp on windows
"Jamie Lahowetz" <[email protected]> Wed, 20 Jun 2007 22:06:49 -0500
| Newsgroups | gmane.network.ssh.windows |
|---|---|
| Message-ID | <[email protected]> |
On 6/19/07, Welsh, Armand <[email protected]> wrote: > > from the Windows Command prompt: > H:\welsh>sftp > usage: sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config] > [-o ssh_option] [-P sftp_server_path] [-R num_requests] > [-S program] [-s subsystem | sftp_server] host > sftp [[user@]host[:file [file]]] > sftp [[user@]host[:dir[/]]] > sftp -b batchfile [user@]host > This does not come up when I type 'sftp in the cmd prompt. Because the perl script I am using does not allow for me to edit the options in the sftp command I need to be able to type "sftp [email protected]" in order for the script to work. H:\welsh>which sftp > /usr/bin/sftp > > > So, yes. you can do it this way. Though, I must wonder if the copSSH > install failed to install correctly, or if it was installed under a > different username, because mine works fine, as seen here: > > H:\welsh>sftp welsh@alpha1 > Connecting to alpha1... > The authenticity of host 'alpha1 (144.77.101.76)' can't be established. > RSA key fingerprint is 70:4e:6d:6e:d2:9e:35:62:62:7e:80:d3:ca:45:1d:aa. > Are you sure you want to continue connecting (yes/no)? yes > NOTICE: This system has been configured to utilize Kerberos > Authentication. > When using interactive login (i.e., entering username/password pairs) > please use your Windows password. > > welsh@alpha1's <welsh@alpha1%27s> password: > sftp> ls > krb5_info ldapauth.sh nsmail > openssh-4.1p1.patch openssh-4.2p1.patch > > scripts src sybase_kerberos > tomcat > sftp> exit > > > What concerns me is the way the error is being returned. Are you running > this from inside a BASH or other unix/cygwin based shell, or from the > windows command prompt? When running under windows, you need to provide the > windows path, not the unix/linux type of path. > I am running this from inside the windows command prompt. Because the perl script I am using does not allow for me to edit the options in the sftp command I need to be able to type "sftp [email protected]" in order for the script to work. IOW i cant specify the the windows path. I tried to reinstall copSSH only to have the same results. ------------------------------ > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Jamie > Lahowetz > *Sent:* Tuesday, June 19, 2007 3:38 PM > *To:* [email protected] > *Subject:* sftp on windows > > I wrote a perl script that uses Net::SFTP to connect to a server and > upload files. This is done on a Windows system that required openSSH to be > installed because the perl script used the 'sftp ' command in the command > prompt to login to the server. I have been told by others that openssh for > windows is not maintained anymore and I should be using copssh. My question > is if copssh can do the same thing as OpenSSH, meaning that at the command > prompt I can enter 'sftp ' and the terminal will connect? This is very > important to my perl script. If it can how can I set it up? I noticed that > there is a sftp.exe in the folder copSSH\bin, who do I make the file run > when I type in 'sftp' from anywhere in the terminal window? Also, can I log > in by typing "sftp [email protected]" in the window cause when I tried > that ( after navigating to copSSH\bin and running the exe) I get the error > 'exec: /usr/bin/ssh: No such file or directory'. > -- Jamie Lahowetz