Operating System - HP-UX
1848552 Members
6903 Online
104033 Solutions
New Discussion

PUTTY and HPUX11 and WinCvs

 
Rudolf_1
Occasional Advisor

PUTTY and HPUX11 and WinCvs

To putty- and hpux experts!

I have a server running hpux 11.0 and desperate try to use Putty from WinXP in order handle WinCvs.

I've generated private/public key pair and pasted the public key to the hpux server into the file: ~/.ssh2/authorized_keys. In the same directory I have the file authorization containing only one line: Key $HOME/.ssh2/authorized_keys. I've also uncommented the line "AuthorizationFile authorization" in /etc/ssh2/sshd2_config (see below) and restarted the sshd2 daemon by typing: kill -HUP `cat /var/run/sshd2_22.pid`

Then I started Pageant, added the private key, configured a session profile and started this session. Result: The server is connected but I'm still asked to type my passwd which is not what I want to when working with WinCvs. So what went wrong? What did I wrong?

Thanks for your help!
Rudi

PS:
In editing the file /etc/ssh2/sshd2_config I woundered that almost everything is commented (see attachment). Might that be the source of my problem. I would be very happy if anyone could help me.


***************** START *****************
## SSH CONFIGURATION FILE FORMAT VERSION 1.1
## REGEX-SYNTAX egrep
## end of metaconfig
## (leave above lines intact!)
## sshd2_config
## SSH 3.2 Server Configuration File
##

## General

# HostKeyFile hostkey
# PublicHostKeyFile hostkey.pub
# RandomSeedFile random_seed
# BannerMessageFile /etc/ssh2/ssh_banner_message
# BannerMessageFile /etc/issue.net
#
# VerboseMode no
# QuietMode no
# SyslogFacility AUTH
# SyslogFacility LOCAL7
# SftpSyslogFacility LOCAL7

## Network

# Port is not commented out, as it is needed by the example startup
# scripts. Well, the default won't likely change.
Port 22
# ListenAddress any
# ResolveClientHostName yes
# RequireReverseMapping no
# MaxBroadcastsPerSecond 0
# MaxBroadcastsPerSecond 1
# NoDelay no
# KeepAlive yes
# MaxConnections 50
# MaxConnections 0
# 0 == number of connections not limited

## Crypto

# Ciphers AnyCipher
# Ciphers AnyStdCipher
# Ciphers 3des
# Following includes "none" 'cipher':
# Ciphers AnyStd
#
# MACs AnyMAC
# MACs AnyStdMAC
# Following includes "none" 'mac':
# MACs AnyStd
#
# RekeyIntervalSeconds 3600

## User

# PrintMotd yes
# CheckMail yes
# StrictModes yes
# Specifies 1 hour (you can also use 'w' for week, 'd' for day, 'm' for
# minute, 's' for seconds)
# IdleTimeOut 1h
# without specifier, the default number is in seconds
# IdleTimeOut 3600
#
# UserConfigDirectory "%D/.ssh2"
# UserConfigDirectory "/etc/ssh2/auth/%U"
AuthorizationFile authorization
# This variable is set here, because by default it's empty, and so no
# variables can be set. Because of that, we set a few common ones here.
SettableEnvironmentVars LANG,LC_(ALL|COLLATE|CTYPE|MONETARY|NUMERIC|TIME),PATH,TERM,TZ

## Tunneling

# AllowX11Forwarding yes
# AllowTcpForwarding yes
# AllowTcpForwardingForUsers sjl, cowboyneal@slashdot\.org
# DenyTcpForwardingForUsers 2[[:digit:]]*4,peelo
# AllowTcpForwardingForGroups privileged_tcp_forwarders
# DenyTcpForwardingForGroups coming_from_outside
#
# Local port forwardings to host 10.1.0.25 ports 143 and 25 are
# allowed for all users in group users.
# Note that forwardings using the name of this host will be allowed (if
# it can be resolved from the DNS).
#
# ForwardACL allow local .*%users \i10\.1\.0\.25%(143|25)
#
# Local port forwardings requested exactly to host proxy.company.com
# port 8080 are allowed for users that have 's' as first character
# and belong to the group with group id 10:
#
# ForwardACL allow local s.*%10 proxy\.company\.com%8080
#
# Remote port forwarding is denied for all users to all hosts:
# ForwardACL deny remote .* .*


## Authentication
## publickey and password allowed by default

# AllowedAuthentications publickey,password
# AllowedAuthentications hostbased,publickey,password
# AllowedAuthentications hostbased,publickey,keyboard-interactive
# RequiredAuthentications publickey,password
# LoginGraceTime 600
# AuthInteractiveFailureTimeout 2
#
# HostbasedAuthForceClientHostnameDNSMatch no
# UserKnownHosts yes
#
# AuthPublicKey.MaxSize 0
# AuthPublicKey.MinSize 0
# AllowAgentForwarding yes
#
# AuthKbdInt.NumOptional 0
# AuthKbdInt.Optional pam,password
# AuthKbdInt.Required password
# AuthKbdInt.Retries 3
#
# PermitEmptyPasswords no
# PasswordGuesses 3

## Host restrictions

# AllowHosts localhost, foobar.com, friendly.org
#
## Next one matches with, for example, taulu.foobar.com, tuoli.com, but
## not tuoli1.com. Note that you have to input string "\." when you want it
## to match only a literal dot. You also have to escape "," when you
## want to use it in the pattern, because otherwise it is considered a list
## separator.
##
## AllowHosts t..l.\..*
##
## The following matches any numerical IP-address (yes, it is cumbersome)
##
## AllowHosts ([[:digit:]]{1\,3}\.){3}[[:digit:]]{1\,3}
##
## Same thing is achieved with using the special prefix "\i" in a
## pattern. This means that the pattern is only used to match
## IP-addresses.
##
## Using the above example:
##
## AllowHosts \i.*
##
## You can probably see the difference between the two.
##
## Also, you can use subnet masks, by using prefix "\m"
##
## AllowHosts \m127.0/8
## and
## AllowHosts \m127.0.0.0/24
##
## would match localhost ("127.0.0.1").
##
# DenyHosts evil\.org, aol\.com
# AllowSHosts trusted\.host\.org
# DenySHosts not\.quite\.trusted\.org
# IgnoreRhosts no
# IgnoreRootRHosts no
# (the above, if not set, is defaulted to the value of IgnoreRHosts)

## User restrictions

# AllowUsers sj.*,s[[:digit:]]*,s(jl|amza)
# DenyUsers skuuppa,warezdude,31373
# DenyUsers don@untrusted\.org
# AllowGroups staff,users
# DenyGroups guest,anonymous
# PermitRootLogin yes
# PermitRootLogin nopwd

## Chrooted environment

# ChRootUsers anonymous,ftp,guest
# ChRootGroups sftp,guest

## SSH1 compatibility

Ssh1Compatibility yes
Sshd1Path /usr/local/sbin/sshd1
#
# This is given as argument to sshd1 with "-f" if sshd2 is invoked
# with "-f", otherwise the default configuration for sshd1 is used.
# Sshd1ConfigFile /etc/sshd_config_alternate

## subsystem definitions

# Subsystems don't have defaults, so this is needed here (uncommented).
subsystem-sftp sftp-server
# Also internal sftp-server subsystem can be used.
# subsystem-sftp internal://sftp-server

## Subconfiguration
# There are no default subconfiguration files. When specified the last
# obtained keyword value will prevail. Note that the host specific files
# are read before the user specific files.

# Following matches (from) any host
#
# HostSpecificConfig .* /etc/ssh2/subconfig/host_ext.example
#
# Following matches to subnet mask:
#
# HostSpecificConfig \m192.168.0.0/16 /etc/ssh2/subconfig/host_int.example
#
# Following matches to users from ssh.com that have two character long
# username or is sjl and belong to group wheel or wheel[0-9]
#
# UserSpecificConfig (..|sjl)%wheel[[:digit:]]?@ssh\.com /etc/ssh2/subconfig/user.example
#
# Following matches to the user anonymous from any host
#
# UserSpecificConfig anonymous@.* /etc/ssh2/subconfig/anonymous.example

**************** END **************
12 REPLIES 12
Jeff Schussele
Honored Contributor

Re: PUTTY and HPUX11 and WinCvs

Hi Rudolf,

Check your version of Putty.
Versions 0.52 & prior are known to have trouble with this.
I use ver 0.53b & have no trouble.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Rudolf_1
Occasional Advisor

Re: PUTTY and HPUX11 and WinCvs

Dear Jeff,

I'm using putty 0.54

Rudi
RAC_1
Honored Contributor

Re: PUTTY and HPUX11 and WinCvs

On server side, can you do sshd -ddd and post the results? I think it is failing in exchanging public/private keys and then goes on to do password authentication.

Also does sshd_config file somewhere talks about preferred authentication?

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: PUTTY and HPUX11 and WinCvs

I'm not sure where you got your instructions. They are a little different than the ones I have used successfully. That doesn't mean yours are wrong.

See the document I'm attaching, it might help you figure out the problem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rudolf_1
Occasional Advisor

Re: PUTTY and HPUX11 and WinCvs

Anil,

here is what I got:

sshd: SSH Secure Shell 3.2.3 (non-commercial version) on hppa2.0w-hp-hpux11.00
debug[27130]: Host key pair is not specified, trying to use default 'hostkey'.
debug[27130]: Becoming server.
debug[27130]: Creating listener
sshd[27130]: FATAL: Creating listener failed: port 22 probably already in use!

Rudi
RAC_1
Honored Contributor

Re: PUTTY and HPUX11 and WinCvs

Kill your running sshd. /sbin/init.d/ssh stop.

Start sshd in debug mode.

which sshd?

/usr/sbin/sshd -ddd and try as said earlier and post the reults.

Anil
There is no substitute to HARDWORK
Rudolf_1
Occasional Advisor

Re: PUTTY and HPUX11 and WinCvs

attached the debug result when I access the server via putty

Rudi
RAC_1
Honored Contributor

Re: PUTTY and HPUX11 and WinCvs

Is this the output of sshd -ddd?

Did you start sshd as sshd -ddd? you do this and now try connecting from Windows.

Post results.

Anil
There is no substitute to HARDWORK
Rudolf_1
Occasional Advisor

Re: PUTTY and HPUX11 and WinCvs

Yes,

First I killd sshd. Sice an sshd was still runnung after entering /sbin/init.d/ssh stop, I killd sshd by using the kill -9 command.

Then I started sshd by typing /usr/local/sbin/sshd -ddd 2>file &

Then on the pc I started pageant, used the personal key and opend an ssh session. Connecting to the server in this way I was asked for the password (I was not asked for the user name, because this is supplied from the saved putty session). I should not be asked for the password when I'm logging in since I have to enter my password (passphrase) when I tell putty to use my personal key for the ssh session.

Rudi
RAC_1
Honored Contributor

Re: PUTTY and HPUX11 and WinCvs

Foe some reason the process is doing sigchld and cearting problem.

How did you create the keys? Did you use puttygen executable for this?

How did you put public key on HP-UX? Did you do cut paste for this? This could create problems and then ssh will fall back onto password based authentication.

Anil
There is no substitute to HARDWORK

Re: PUTTY and HPUX11 and WinCvs

Hi,
was the key generated with puttygen ?
Was the public key translated on HP-UX with ssh-keygen -e -f key > keyfile?
Franta.
Rudolf_1
Occasional Advisor

Re: PUTTY and HPUX11 and WinCvs

Hi,

back with putty and HP....

Finally I figured out the source of my problem. Obviously my server does not support SSH2. After I had generated SSH1 private/public keys everything worked well.

I would like to thank all of you who tried to assist to solve the problem. It's goot to realize that there are people willing to help. Thanks a lot.

I've also attached a short document dealing with putty-wincvs.

best wishes
Rudi