All pastes #909186 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-18 23:32 UTC
rendered paste body
#!/sbin/bash

# install ssh
# (c) 2007 macTijn at awkwardtv dot org

install_file() {
  SRC="$1"
  DST="$2"
  OWN="$3"
  PERM="$4"
  
  /sbin/cp -p -r "$SRC" "$DST"
  /sbin/chown -R "$OWN" "$DST"
  /sbin/chmod -R "$PERM" "$DST"
}

echo -n " * Installing SSH... "

install_file /stuff/ssh/sshd /OSBoot/usr/sbin/sshd 0:0 755
install_file /System/Library/Frameworks/OSXFrames/Kerberos.framework /OSBoot/System/Library/Frameworks/OSXFrames/. 0:0 755
install_file /stuff/ssh/ssh.plist /OSBoot/System/Library/LaunchDaemons/ssh.plist 0:0 755
install_file /usr/libexec/sshd-keygen-wrapper /OSBoot/usr/libexec/sshd-keygen-wrapper 0:0 755
install_file /stuff/ssh/sftp-server /OSBoot/usr/libexec/sftp-server 0:0 755
install_file /stuff/ssh/ssh-keysign /OSBoot/usr/libexec/ssh-keysign 0:0 755

# /usr/bin
for a in ssh scp sftp ssh-add ssh-agent ssh-keygen ssh-keyscan; do
  install_file /stuff/ssh/$a /OSBoot/usr/bin/$a 0:0 755
done

echo "Done."