The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

putty ssh keys

Discussion in 'General Discussion' started by digitalinsights, Oct 20, 2006.

  1. digitalinsights

    Joined:
    Oct 8, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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


    root@web02 [/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?
     
  2. q10hosting

    q10hosting Member

    Joined:
    Oct 8, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Been wanting to know that also.
     
  3. freedog96150

    freedog96150 Well-Known Member

    Joined:
    Mar 25, 2005
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Nevada, USA
    puttygen already exists on my installation. Look in /usr/local/cpanel/bin for puttygen. You can also try
    Code:
    root@host [software]locate puttygen
    or
    Code:
    root@host [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:
    root@host [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.
     
  4. kslim

    kslim Registered

    Joined:
    Dec 19, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  5. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    I have this problem on my centos 5 box too.

    Anyone can help ?
     
  6. cPanelBilly

    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
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:

    Does this bug exist in 0.60 as well?

     
  8. phatteus

    phatteus Registered

    Joined:
    Nov 21, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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?)
     
    #8 phatteus, Oct 24, 2007
    Last edited: Oct 24, 2007
  9. OpperGoeroe

    OpperGoeroe Active Member

    Joined:
    Apr 26, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    16
    Thanks a lot phatteus, that did it!
     
Loading...

Share This Page