Oct 8, 2006
8
0
151
I'm wanting to require ssh key to login to the ssh... However when I click on "Manage SSH keys" in the WHM and then goto import a putty .ppk it says

/usr/local/cpanel/bin/puttygen is missing or not executable. Please build it from /usr/local/cpanel/src/3rdparty/mit/

so I went to the folder and went to make it and then i get


[email protected] [/usr/local/cpanel/src/3rdparty/mit]# make
/usr/local/cpanel/src/3rdparty/mit/utils/build_prep.pl cgiemail-1.6
(cd cgiemail-1.6; \
rm -f config.cache; \
./configure --enable-owner-bounce; \
make)
creating cache ./config.cache
checking cgienv... yes
checking owner-bounce... yes
checking x-headers... yes
checking for sendmail... /usr/sbin/sendmail
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for size_t... yes
checking for sigprocmask... yes
checking for strerror... yes
checking for socket... yes
updating cache ./config.cache
creating ./config.status
creating cgi.h
creating Makefile
creating testce.html
creating config.h
config.h is unchanged
make[1]: Entering directory `/usr/local/cpanel/src/3rdparty/mit/cgiemail-1.6'
gcc -DCSOHEADER=\"/afs/net.mit.edu/admin/www/root/csoheader\" -DCSOFOOTER=\"/afs/net.mit.edu/admin/www/root/csofooter\" -c cgilibcso.c
gcc -o cgicso cgilib.o cgilibcso.o csoget.o cgicso.o
cgilib.o: In function `cgi_mail_template':cgilib.c:(.text+0x16ca): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
make[1]: Leaving directory `/usr/local/cpanel/src/3rdparty/mit/cgiemail-1.6'


I also noticed there was a bash script called buildputty - so trying that

and then it errors out


putty-0.58/README
putty-0.58/sshpubk.c
putty-0.58/mkunxarc.sh
putty-0.58/sftp.h
putty-0.58/Recipe
putty-0.58/logging.c
putty-0.58/sshsha.c
putty-0.58/putty.h
putty-0.58/sshprime.c
putty-0.58/misc.c
putty-0.58/telnet.c
putty-0.58/cmdgen.c
putty-0.58/manifest
putty-0.58/version.def
cc -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ -I../mac/ -I../macosx/ `gtk-config --cflags` -c ../cmdgen.c
/bin/sh: gtk-config: command not found
cc1: warnings being treated as errors
../cmdgen.c: In function âblobfpâ:
../cmdgen.c:235: warning: pointer targets in passing argument 2 of âMD5Updateâ differ in signedness
../cmdgen.c: In function âmainâ:
../cmdgen.c:699: warning: pointer targets in passing argument 1 of âssh1_read_bignumâ differ in signedness
../cmdgen.c:705: warning: pointer targets in passing argument 1 of âssh1_read_bignumâ differ in signedness
../cmdgen.c:877: warning: pointer targets in assignment differ in signedness
../cmdgen.c:889: warning: pointer targets in assignment differ in signedness
../cmdgen.c:909: warning: pointer targets in passing argument 1 of âbase64_encode_atomâ differ in signedness
gmake: *** [cmdgen.o] Error 1
install: cannot stat `puttygen': No such file or directory



Any suggestions on getting this to work?
 

freedog96150

Well-Known Member
Mar 25, 2005
68
0
156
Nevada, USA
puttygen already exists on my installation. Look in /usr/local/cpanel/bin for puttygen. You can also try
Code:
[email protected] [software]locate puttygen
or
Code:
[email protected] [software]find / -name "puttygen" -depth -print
If it is not there, you can use the scripts mentioned previously. Make sure that you install the gtk libraries/tools first. Depending on your OS, you can use yum, apt-get, up2date, or whatever rpm manager your system uses and install gtk and gtk-config. On my CentOS 3.x system I use
Code:
[email protected] [software] yum install gtk gtk-config
After gtk is installed you can run the /usr/local/cpanel/src/3rdparty/mit/buildputty script.

As an alternative, I mostly use puttygen on my windows box and cut/paste the key into the appropriate .ssh/authorized_keys file for each user.
 

kslim

Registered
Dec 19, 2004
4
0
151
hello...

still the same error at cpanel Private SSH Key id_dsa conversion to ppk format::

/usr/local/cpanel/bin/puttygen is missing or not executable. Please build it from /usr/local/cpanel/src/3rdparty/mit/

can someone tell me how to solve it?
 
C

cPanelBilly

Guest
This is a bug in putty-0.58 I have contacted development to have them add in the latest version of putty which fixes this
 

phatteus

Registered
Nov 21, 2004
3
0
151
0.60 works.

Locate puttygen. Mine was here:
Code:
cd /usr/local/cpanel/src/3rdparty/mit/
Download putty 0.60 using wget:
Code:
wget http://the.earth.li/~sgtatham/putty/latest/putty-0.60.tar.gz
unzip it:
Code:
tar -zxvf putty-0.60.tar.gz
Then change the 58 at the top of this file to a 60:
Code:
pico /usr/local/cpanel/src/3rdparty/mit/buildputty
Then run
Code:
./buildputty
After that, create an ssh key with Manage SSH keys. RSA or DSA, it doesn't matter. If you use a passphrase you'll have to enter that when you connect (which kind of defeats the purpose of using a key in the first place).

Authorize the key with Manage Authorization.

View/download the private key. Enter the passphrase to convert it to Putty PPK

Copy/paste the PPK output into a new file on your computer ending in the .ppk extension.

In Putty, under Connection > User Name, enter the username you'd like to log in as.
Under Connection > SSH > Auth, browse to where you saved the .ppk file.
Save this as a Saved Session and enjoy.

Done. (whew, was that really easier?)
 
Last edited: