找不到openvpn easy-rsa命令

时间:2013-05-09 03:50:06

标签: rsa openvpn centos6

我试图在我的centos 6盒子上安装openvpn 即时通讯使用epel存储库来安装vpn 一切都在安装上很好,但不知何故来生成证书部分 当我输入“source ./vars”命令

时,发现很多未找到的命令

这是从终端

返回的
[root@... easy-rsa]# source ./vars
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-rsa/keys
: command not found
: command not found
: command not found
: command not found
: command not found

这是我的vars文件设置

# easy-rsa parameter settings

# NOTE: If you installed from an RPM,
# don't edit this file in place in
# /usr/share/openvpn/easy-rsa --
# instead, you should copy the whole
# easy-rsa directory to another location
# (such as /etc/openvpn) so that your
# edits will not be wiped out by a future
# OpenVPN package upgrade.

# This variable should point to
# the top level of the easy-rsa
# tree.
export EASY_RSA="`pwd`"

#
# This variable should point to
# the requested executables
#
export OPENSSL="openssl"
export PKCS11TOOL="pkcs11-tool"
export GREP="grep"


# This variable should point to
# the openssl.cnf file included
# with easy-rsa.
export KEY_CONFIG=/etc/openvpn/easy-rsa/openssl.cnf

# Edit this variable to point to
# your soon-to-be-created key
# directory.
#
# WARNING: clean-all will do
# a rm -rf on this directory
# so make sure you define
# it correctly!
export KEY_DIR="$EASY_RSA/keys"

# Issue rm -rf warning
echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR

# PKCS11 fixes
export PKCS11_MODULE_PATH="dummy"
export PKCS11_PIN="dummy"

# Increase this to 2048 if you
# are paranoid.  This will slow
# down TLS negotiation performance
# as well as the one-time DH parms
# generation process.
export KEY_SIZE=1024

# In how many days should the root CA key expire?
export CA_EXPIRE=3650

# In how many days should certificates expire?
export KEY_EXPIRE=3650

# These are the default values for fields
# which will be placed in the certificate.
# Don't leave any of these fields blank.
export KEY_COUNTRY="US"
export KEY_PROVINCE="CA"
export KEY_CITY="SanFrancisco"
export KEY_ORG="Fort-Funston"
export KEY_EMAIL="me@myhost.mydomain"
export KEY_EMAIL=mail@host.domain
export KEY_CN=changeme
export KEY_NAME=changeme
export KEY_OU=changeme
export PKCS11_MODULE_PATH=changeme
export PKCS11_PIN=1234

任何帮助将不胜感激 感谢

1 个答案:

答案 0 :(得分:0)

如果您注意到echo之前有7个命令未找到语句。在回声之前还有7条“空”线。密钥dir变量似乎在echo语句中正确扩展。在echo语句之后有5个“空”行和5个命令未找到错误。这让我觉得命令not found语句是“空”行的结果。

显然,如果该行为空,则不应导致该类错误。 “vars”文件是如何实现的?您是否复制/粘贴了它并且在此过程中复制了不可见的字符?或者它可能是在使用不同类型回车的设备上编辑的?

你应该在它上面使用vim等编辑器来帮助你看到正常隐藏的字符。您也可以尝试使用像tofrodos这样的程序来转换回车。当您获取文件时,您实际上正在执行一个脚本,并且导出的任何变量都会成为我们发送它的shell的一部分。通常,脚本符合unix行结尾。