Solaris ssh from DVD

From Lolly's Wiki
Revision as of 17:02, 25 November 2021 by Lollypop (talk | contribs) (Text replacement - "<source " to "<syntaxhighlight ")
Jump to navigationJump to search

Get SSH on a system bootet from DVD

Mount DVD

<syntaxhighlight lang=bash>

  1. iostat -En

c0t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: AMI Product: Virtual CDROM Revision: 1.00 Serial No: Size: 0.00GB <0 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 732 Predictive Failure Analysis: 0 ...

  1. mkdir /tmp/dvd
  2. mount -F hsfs -oro /dev/dsk/c0t0d0s0 /tmp/dvd

</source>

Unpacking software

<syntaxhighlight lang=bash>

  1. mkdir /tmp/pkg
  2. pkgtrans /tmp/dvd/Solaris_10/Product /tmp/pkg SUNWsshu SUNWcry SUNWopenssl-libraries
  3. mkdir /tmp/ssh
  4. cd /tmp/ssh
  5. 7z x -so /tmp/pkg/SUNWsshu/archive/none.7z | cpio -idv
  6. 7z x -so /tmp/pkg/SUNWcry/archive/none.7z | cpio -idv
  7. 7z x -so /tmp/pkg/SUNWopenssl-libraries/archive/none.7z | cpio -idv

</source>

Use unpacked libraries

<syntaxhighlight lang=bash>

  1. crle -c /var/ld/ld.config -l /tmp/ssh/usr/sfw/lib:/lib:/usr/lib
  2. crle

Configuration file [version 4]: /var/ld/ld.config

 Platform:     32-bit LSB 80386
 Default Library Path (ELF):   /tmp/ssh/usr/sfw/lib:/lib:/usr/lib
 Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)

Command line:

 crle -c /var/ld/ld.config -l /tmp/ssh/usr/sfw/lib:/lib:/usr/lib

</source>

Check it

<syntaxhighlight lang=bash>

  1. ldd /tmp/ssh/usr/bin/ssh
       libsocket.so.1 =>        /lib/libsocket.so.1
       libnsl.so.1 =>   /lib/libnsl.so.1
       libz.so.1 =>     /usr/lib/libz.so.1
       libcrypto.so.0.9.7 =>    /usr/sfw/lib/libcrypto.so.0.9.7
       libgss.so.1 =>   /usr/lib/libgss.so.1
       libc.so.1 =>     /lib/libc.so.1
       libmp.so.2 =>    /lib/libmp.so.2
       libmd.so.1 =>    /lib/libmd.so.1
       libscf.so.1 =>   /lib/libscf.so.1
       libcmd.so.1 =>   /lib/libcmd.so.1
       libdoor.so.1 =>  /lib/libdoor.so.1
       libuutil.so.1 =>         /lib/libuutil.so.1
       libgen.so.1 =>   /lib/libgen.so.1
       libcrypto_extra.so.0.9.7 =>      /tmp/ssh/usr/sfw/lib/libcrypto_extra.so.0.9.7
       libm.so.2 =>     /lib/libm.so.2

</source> Looks good:

  • libcrypto_extra.so.0.9.7 => /tmp/ssh/usr/sfw/lib/libcrypto_extra.so.0.9.7

Use ssh from /tmp/ssh

<syntaxhighlight lang=bash>

  1. /tmp/ssh/usr/bin/ssh <user>@<ip>

</source>