Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OpenSSH Kompilieren

Empfohlene Antworten

Veröffentlicht

Hi @all,

im netzt habe ich folgedens gefunden:

http://www.anchor.net.au/code/openssh2putty.c

Wenn man OpenSSH mit dieser Datei Neu Kompiliert, kann man unter linux mit dem ssh-keygen, Private Keys in einem Putty Tauglichem Format erstellen, ohne das man die Private Keys mit dem Puttygen umwandeln müste.

Leider habe ich nur ein Problem. Der Autor beschreibt, dass man das Make.in File bearbeiten muss und dass man ein Paar Zeilen aus der ssh-add.c Kopieren müsste, aber ich hab das Nicht so wirklich verstanden, kann mir das mal jemand erklären...

/* Hacked up ssh-add.c code to convert an OpenSSH key into a format

 * suitable for the Windows SSH client "putty"

 *

 * [email]egalanos-putty@anchor.net.au[/email]

 *

 * To compile you will need the OpenSSH source code. I have tested this

 * using OpenSSH 2.9p2 (on a ix86 Red Hat GNU/Linux box) and Putty 0.52 on

 * Windows 98

 *

 * Requires key to use encryption. A small change to the code could get

 * around this...

 *

 * Simply place in the same directory as the code, then edit Makefile.in

 * to add some lines to compile openssh2putty.c (copy the lines for ssh-add.c)

 * (re)run ./configure

 * make openssh2putty

 * ./openssh2putty keyfilename

 *

 */

Unter den Oben genannten Link, findet ihr den Gesamten Quellcode

hi :)

Also entpacke den source code von Openssh irgendwo hin...

Dann schiebe deine openssh2putty.c Datei in dieses Verzeichniss in dem der Sourcecode liegt.

Dann kopierst du aus dem Makefile.in die Zeilen von der ssh-add.c Datei und fügst sie wieder ein und ersetzt in den eingefügten Zeilen das "ssh-add.c" durch das "openssh2putty.c"...

Speicherst das ganze machste nochmal nen configure und kompilierst mit Hilfe von make openssh2putty das Programm openssh2putty...

Zur Erklärung wie Make aufgebaut ist bzw. die Makedatei siehe hier ->

Link :)

Dann verstehst du auch warum du die Zeilen im makefile nochmals kopieren und ändern musst :)

Viel Spass

Hi,

danke für die Ausführliche Antwort ... ich werde es mir morgen anschauen und dir bescheid sagen ...

Hi, da bin ich wieder...

ich hab das nicht so ganz verstaden, was soll ich genau im Makefile.in suchen bzw. ersestzen ???

Ich Poste dir einfach mal das Makefile.in

prefix=@prefix@

exec_prefix=@exec_prefix@

bindir=@bindir@

sbindir=@sbindir@

libexecdir=@libexecdir@

mandir=@mandir@

mansubdir=@mansubdir@

sysconfdir=@sysconfdir@

piddir=@piddir@

srcdir=@srcdir@

top_srcdir=@top_srcdir@


DESTDIR=


VPATH=@srcdir@


SSH_PROGRAM=@bindir@/ssh

ASKPASS_LOCATION=@libexecdir@/ssh

ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass


CC=@CC@

LD=@LD@

PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"

CFLAGS=@CFLAGS@ -I. -I$(srcdir) $(PATHS) @DEFS@

LIBS=@LIBS@

AR=@AR@

RANLIB=@RANLIB@

INSTALL=@INSTALL@

PERL=@PERL@

ENT=@ENT@

LDFLAGS=-L. @LDFLAGS@


INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@


TARGETS=ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)


LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dispatch.o dsa.o hmac.o hostfile.o key.o kex.o log.o match.o mpaux.o nchan.o packet.o radix.o entropy.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o util.o uuencode.o xmalloc.o


LIBOPENBSD_COMPAT_OBJS=bsd-arc4random.o bsd-base64.o bsd-bindresvport.o bsd-daemon.o bsd-inet_aton.o bsd-inet_ntoa.o bsd-misc.o bsd-mktemp.o bsd-rresvport.o bsd-setenv.o bsd-sigaction.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bsd-strsep.o fake-getaddrinfo.o fake-getnameinfo.o next-posix.o


SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o log-client.o readconf.o clientloop.o


SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-rhosts.o auth-options.o auth-krb4.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o loginrec.o servconf.o serverloop.o md5crypt.o session.o


TROFFMAN        = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8

CATMAN          = scp.0 ssh-add.0 ssh-agent.0 ssh-keygen.0 ssh.0 sshd.0

MANPAGES        = @MANTYPE@

Hi.

Also irgendwie ne....

Kann es sein das du eine andere Version aus die openssh-2.9p2.tar.gz hast?

Denn in dem Makefile von dieser Version sind die besagten Zeilen vorhanden ...

Denn wie der Autor von deinem C Code auch sagt

* To compile you will need the OpenSSH source code. I have tested this

* using OpenSSH 2.9p2 (on a ix86 Red Hat GNU/Linux box) and Putty 0.52 on

* Windows 98

:) Also try it

der link funzt nicht :(

Also ich hab das Mal Kompiliert. Es schien alles gut zu laufen, bis auf Folgende Meldung...

collect2: ld returned 1 exit status

make: *** [openssh2putty] Error 1

Ist das jetzt einen Fehler bei der Kompielirung gewesen ?

Wie kann ich eigentlich, jetzt einen Putty Tauglichen SSH-Private Key erstellen ?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.