我正在尝试在cygwin提示符下运行脚本。
ssh-keygen -t rsa $email
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
mkdir -p /proj/env
ln -s /usr/bin/proj/env/bin
并将其作为email =“john.warnet”sh script1.sh。
运行但它显示错误为
Too many arguments.
usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
[-N new_passphrase] [-C comment] [-f output_keyfile]
ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
ssh-keygen -i [-m key_format] [-f input_keyfile]
ssh-keygen -e [-m key_format] [-f input_keyfile]
ssh-keygen -y [-f input_keyfile]
ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]
ssh-keygen -B [-f input_keyfile]
ssh-keygen -D pkcs11
ssh-keygen -F hostname [-f known_hosts_file] [-l]
ssh-keygen -H [-f known_hosts_file]
ssh-keygen -R hostname [-f known_hosts_file]
ssh-keygen -r hostname [-f input_keyfile] [-g]
ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]
[-j start_line] [-K checkpt] [-W generator]
ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]
[-O option] [-V validity_interval] [-z serial_number] file ...
ssh-keygen -L [-f input_keyfile]
ssh-keygen -A
ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]
file ...
ssh-keygen -Q -f krl_file file ...
Agent pid 1344
Identity added: /home/HP/.ssh/id_rsa (/home/HP/.ssh/id_rsa)
我尝试通过在提示符上编写命令而不是复制来运行脚本。但是找不到解决方案。
答案 0 :(得分:1)
如果您需要将电子邮件地址作为参数传递给ssh-keygen
,您可以像下面一样运行它
w