homebrew-core/Formula/ssh-copy-id.rb

25 lines
746 B
Ruby

class SshCopyId < Formula
desc "Add a public key to a remote machine's authorized_keys file"
homepage "https://www.openssh.com/"
url "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz"
mirror "https://mirror.vdms.io/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz"
version "8.5p1"
sha256 "f52f3f41d429aa9918e38cf200af225ccdd8e66f052da572870c89737646ec25"
license "SSH-OpenSSH"
head "https://github.com/openssh/openssh-portable.git"
bottle :unneeded
keg_only :provided_by_macos
def install
bin.install "contrib/ssh-copy-id"
man1.install "contrib/ssh-copy-id.1"
end
test do
output = shell_output("#{bin}/ssh-copy-id -h 2>&1", 1)
assert_match "identity_file", output
end
end