SFTP - UNIX to Windows without keys


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers SFTP - UNIX to Windows without keys
# 1  
Old 12-19-2011
SFTP - UNIX to Windows without keys

When I try to SFTP from our UNIX box to an outside vendor using passwords - no keys, I am immediately get disconnected.
We have the FIREWALL open because I get prompted for the password.

Here's the error:

Code:
sftp userid@sftp.test.com
Connecting to sftp.test.com...
userid@sftp.test.com's password:
Received disconnect from 123.12.12.12: 2:
Connection closed

I can SFTP to the ip address from a PC or a Linux box outside the firewall with no problem.

Why do I get disconnected right away?

Any help is greatly appreciated - thanks!
Barbara

Last edited by zxmaus; 12-19-2011 at 09:40 PM..
# 2  
Old 12-19-2011
If it works outside the firewall but not inside the firewall, the problem's probably the firewall.

Trying sftp -v or sftp -v -v may show more information.

Keys vs no keys shouldn't matter.
# 3  
Old 12-19-2011
We've tried that and also
Code:
sftp -vvv -o PreferredAuthentications=password

; however we still get disconnected. Here's the tail end of the log:

Code:
debug1: Authentication succeeded (password).
debug2: fd 5 setting O_NONBLOCK
debug3: fd 6 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem confirm 1
debug2: fd 4 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 300000 rmax 30000
Received disconnect from 123.12.12.12: 2:
Connection closed

Thanks,
Barbara

Last edited by zxmaus; 12-19-2011 at 09:40 PM..
# 4  
Old 12-19-2011
An idea:
Check that the remote computer can do a reverse DNS lookup of your unix computer and get a correct result.

Please state the Operating System and version all computers involved (and that includes any Firewalls).
The original post mentions M$ Windows. What version or M$ Windows?

Another idea:
Have you checked the target IP adress? (In case there is a NAT translation from your LAN to the www).

Last edited by methyl; 12-19-2011 at 10:32 PM.. Reason: realised that O/P mentioned Windows
# 5  
Old 02-10-2012
SFTP -no keys-eliminate password prompt-use autosys job

When we updated SSH to Version 5.6 on our UNIX machine; we were successful in keeping an open session to the machine.

Now, I have the problem of writing a script to do this SFTP via an autosys job. It always asks for password; which I want to include in the script.

After reading a lot of posts = it looks like this can't be done.

Does anyone have a solution - thanks in advance for your help!
# 6  
Old 02-10-2012
ssh is specifically designed to prevent you from injecting plaintext passwords into it for security reasons; for one, this is very hard to do safely. For another, this is precisely what hackers need to bruteforce other machines.

If you insist it may be possible using a third-party brute-forcing utility like expect but it will be complicated and ugly.

The true solution is to use keys. That's what they're there for.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

2. Shell Programming and Scripting

SFTP from Unix to Windows

Hi all Not sure where I should be posting this so apologies if it's in the wrong section. I'm trying to set up a system where we can copy a file (get) from a Windows server to a Unix server using SFTP in an automated way. I've installed CoreFTP Server on the Windows server and can connect... (2 Replies)
Discussion started by: huskie69
2 Replies

3. AIX

sftp between Unix & windows

Guys, sftp between Unix & Windows I'd like to get good software or a way to how to configure sftp between ( windows to Unix ) and ( Unix to windows ) to be automatic login between the different operating systems without asking password .. Pls assist in this regard … (3 Replies)
Discussion started by: Mr.AIX
3 Replies

4. Shell Programming and Scripting

sftp connection from Unix to windows

Hi guyz, I have a Solaris 5.9 box from which i need to connect to a windows server using Coreftp (passwordless login). Coreftp is installed on windows and in solaris, it is already available.I generated a pair of key(public,private) in windows and specify pub key over there, edit the know_hosts... (7 Replies)
Discussion started by: Renjesh
7 Replies

5. AIX

Automate SFTP UNIX to Windows

Hi, Could you please help to solve the below issue... my requirement is automate the SFTP between UNIX and Windows server. I want to get and put some files to UNIX AIX machine(SFTP client) to Windows server(SFTP server). For that, i have generated key pair (private/public) in my AIX machine .... (6 Replies)
Discussion started by: mahiban
6 Replies

6. Shell Programming and Scripting

sftp from unix to windows using keys

I'm working on setting up an automated script on a unix server to secure ftp (get) a file from a remote host which is a windows server with Vshell . I understand in order for the paswword-less authentication to work , I need to copy the authorization keys of our server(Solaris) to the remote host... (1 Reply)
Discussion started by: thrashers
1 Replies

7. Shell Programming and Scripting

SFTP failure from unix to windows server

Hi, I am having unix server SUNW,Sun-Fire-V245. remote windows server details: Microsoft Windows In my script i am sftp'ing files to the windows server through sftp command. But the problem i am facing is, some files are successfully sftp'd to windows server and for some files sftp is... (0 Replies)
Discussion started by: syamkp
0 Replies

8. Shell Programming and Scripting

Passwordless sftp from UNIX to windows site

Hallo all , I researched many article in this forum as well as googled. But could not get any help. I request the forum to extend some help. Issue: Want to do a passwordless sftp from an unix machine to windows action taken : 1) on local unix machine ssh-keygen -t dsa 2) Next step ,... (2 Replies)
Discussion started by: konark
2 Replies

9. Shell Programming and Scripting

SFTP from windows E:/ to unix server

Hello All :), I am making a script in the ksh to Secure FTP a set of files from the E:/ drive in windows a computer to a unix server. Had it been in the unix directory, I could have used the expect utility to use the non-interactive mode for sftp, #!/usr/local/bin/expect #!/bin/ksh ... (12 Replies)
Discussion started by: pranavagarwal
12 Replies

10. UNIX for Dummies Questions & Answers

SFTP files from windows drive E: to unix

Hello friends, I was doing this test script which would take a file from my own E: drive to the unix server which i access from a putty. I tried sftp <osuser>@<ipaddress> but it didn't work. does the windows client have to be a server installation? i was trying on win xp from... (4 Replies)
Discussion started by: pranavagarwal
4 Replies
Login or Register to Ask a Question