Cygwin OpenSSH Windows


 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Cygwin OpenSSH Windows
# 1  
Old 05-06-2008
Cygwin OpenSSH Windows

Hi all, I am just enjoying my first experience with UNIX type stuff but I am completely stumped with syntax etc. I have installed OpenSSH on my windows machine which is a working nicley and I can gain access using putty. I am however trying to set up public key authentication and turn off passwords but am not having much luck. I have managed to turn password authentication off in the sshd_config file and key auth is enabled for rsa and dsa. I kind of need a setp by step guide. At the moment I am just being told key refused.

I have tried creating some keys with the keygen util within cygwin which get created in my home\.ssh folder and converting the private key into putty format using puttygen and using that in putty. I am not sure about an authorized_keys file, how to create it and where it should go I think this maybe where I am going wrong. I have also tried generating both keys with puttygen but get the same message.

Another thing I would like to know how to do is to be able to look at the log which shows logon attempts but I have no idea how to do this?

Any help would be greatly appreciated!
# 2  
Old 05-06-2008
I have been following these instructions:

Using putty with OpenSSH

This is my config file in c:\cygwin\etc:

# $OpenBSD: sshd_config,v 1.77 2008/02/08 23:24:07 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/bin:/usr/sbin:/sbin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 40101
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh_host_rsa_key
#HostKey /etc/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 3

RSAAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
IgnoreUserKnownHosts yes
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
Banner /etc/banner.txt

# override default of no subsystems
Subsystem sftp /usr/sbin/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server

I keep getting "Server refused our key"

Any Ideas?

Regards
# 3  
Old 11-20-2008
I'm having trouble one step before you

Hi guys, sorry if my spelling is not the best, but english is not my mother tongue.

This is my first experience with Linux. I have Windows server 2003 enterprise x64, sith SP 2 in english, and I have to setup a SFTP, that authenticates with a public password. I choose to use OpenSSH which i think it is the best option fot SFTP with a public key authentication.

I have tried to follow some pages, like... Setting up a SFTP Server on Windows but I can get it running.

Im going to describe what i did, step by step, as best as posible, hopping that somebody can tell me where my mistake is.

1.- Downloaded a zip file from here: Setting up a SFTP Server on Windows

2.- I tried to follow this guide: http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/, and i made it till the point where it says:

HTML Code:
 <q>
     Assign the server users account (sshd) the appropriate rights:
           ntrights +r SeAssignPrimaryTokenPrivilege -u sshd
</q>
When I type the ntrights, the comand line shows:
HTML Code:
<q>
'ntrights' is not recognized as an internal or external command, operable program or batch file.
</q>
And after that i havenīt been able to move on.

Can somebody help me please... thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to make a Password-Less Login from Windows to Linux using OpenSSH?

I installed the OpenSSH on my Windows Machine. I want to connect to the remote Linux machine without typing password. I followed the bellow instructions but the SSH needs password to establish the connection yet. Open CMD and run: ssh-keygen -t rsa (The public and private keys are generated in... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

2. Programming

Automatic SFTP transfers using OpenSSH on Windows and C#

I would like to create console application in c# to automate the process of downloading some files from a SFTP server to my local hard drive at a set time each week/day. SFTP Server installed OpenSSH for windows and client machine also. Any ideas how I could do such a task? or sample code. ... (0 Replies)
Discussion started by: sufiiyan
0 Replies

3. UNIX for Dummies Questions & Answers

Cygwin/X11 issues on Windows 7

Hi All, I recently upgraded to windows 7 and am therefore reinstalling cygwin/x11 after a long time. On XP I would start xterm from the startxwin.bat file. I am experiencing trouble starting with the startxwin executable which is the new recommended startup method as well as afew other... (2 Replies)
Discussion started by: ScKaSx
2 Replies

4. Shell Programming and Scripting

cygwin script problem windows

I'm using cygwin to make some scripts,but I have the following problem. If I create a simple script like this one: if echo "Error" exit 1 fi echo "`expr $1 + $2`" I obtain line 6: syntax error:unexpected end of file. If I create the same script with cat>filename.txt and execute it... (4 Replies)
Discussion started by: Max89
4 Replies

5. Windows & DOS: Issues & Discussions

OpenSSH with windows server 2003

Hi people, I'm trying to configure the OpenSSH in my win server 2003 to accept connection with public/private keys, without password. I research all over internet sites about, almost all them, have the same instructions that doesn't work. I can just get a sFTP connection with password without... (0 Replies)
Discussion started by: laurentiis
0 Replies

6. Programming

print C codes from Solaris 10, x86 to cygwin on Windows?

Sorry, I meant to type "porting C codes from Solaris 10, x86 to cygwin in Windows" I just installed cygwin 1.7 to my Windows PC. I have a C program that compiles fine using gcc on Solaris 10, x86. This C program contains system calls like: system ("ls -l > file.txt"); and system... (3 Replies)
Discussion started by: serendipity1276
3 Replies

7. Windows & DOS: Issues & Discussions

OpenSSH Server for Windows 2003

Hi Gurus I have installed OpenSSH server in one of my Windows 2003 boxes. I have installed the setup and added the users as told in the link. But i am getting an "Access denied" whenever i try to log in through ssh or sftp. But when i try to log in through my loopback IP (127.0.0.1),i am... (1 Reply)
Discussion started by: Renjesh
1 Replies

8. UNIX for Dummies Questions & Answers

scp from aix to windows (cygwin) fails

Hi... my problem is that I want to copy one html-file to my windows-box webserver using scp. so far no problem but the destination is in /cygdrive/c/program files/dest and as we all know unix doesnt like spaces in paths. scp html.file user@windowsbox:/cygdrive/c/program... (5 Replies)
Discussion started by: cypher82
5 Replies

9. UNIX for Dummies Questions & Answers

How to install Cygwin on Windows XP SP2

Please can anyone help me with how to install cygwin on a windows Xp SP2 platform, I cant seem to get it to work? (1 Reply)
Discussion started by: jimoney
1 Replies

10. BSD

How to use Cygwin to access X windows

Hi, I use WinMe, want to access, remotely, X-windows of my FreeBSD6.2 machine using the Cigwin from my windows machine as a normal user. However, I can login (through ssh and Telnet) to my FeeBSD machine as root and/or 'su' from some users grouped to the 'wheel' group. I'm still new to... (1 Reply)
Discussion started by: Praveen_218
1 Replies
Login or Register to Ask a Question