Articles of ssh keys

bash脚本来创build用户然后创buildssh密钥

请注意我是一个Linux新手,请回答这个问题,因为我对Linux的知识非常有限。 操作系统: Debian Squeeze 我正在使用ZSH并创build了一个名为webuseradd的函数,它看起来像这样: function webuseradd () { echo creating user $1; mkdir /usr/share/nginx/$1; # sshlogin is required to allow user to ssh and sftp sudo useradd -G lshell,sshlogin -b /usr/share/nginx/$1/home -d /usr/share/nginx/$1/home -m –skel /etc/httpskel -K UMASK=027 $1; # /usr/share/nginx/$1 will be the chroot so set it to root sudo chown root:root /usr/share/nginx/$1; […]

使用dynamic公共IP地址将SSHlogin到EC2

通常我设置ssh别名如下: ssh -i ~/path/key.pem [email protected] 但是对于EC2实例,只要实例停止并重新启动, public-host-name就会更改。 我的EC2实例在VPN上,并具有不断的专用IP。 我可以使用什么策略,以便可以在不更改别名的情况下login我的实例? 谢谢!

SSH密钥authentication – 涉及22以外的端口

我在auth.log注意到了这个条目 从ip_address端口51150 ssh2接受公钥myuser 该条目对应于我的基于ssh-key的login事件。 SSH正在侦听默认端口 – 22。 logging的端口51150的作用是什么,这是否意味着我不能使用限制性的iptables设置,阻止所有stream量传入到端口,而不是我以前指定的(如20,21,25,80,443,143 …)

从EC2删除authorized_keys,但仍然有PPK文件,我已连接

我刚删除了我的完整的ec2-user / .ssh /文件夹,我想恢复密钥,这样我就可以访问我的EC2服务器而无需停止并启动它。 我在我的电脑上有一个PPK文件,有一些像“私人线”,所以我猜它有私人和公共密钥…我已经尝试了很多事情没有成功,所以,一步一步来使用此PPK密钥将密钥恢复到服务器的说明? 我仍然通过SSH连接:)

如何允许公钥和/或密码authentication

我试图让科莫多连接到远程服务器。 然而,据我所知,科莫多不支持公共ssh密钥。 我编辑了/ etc / ssh / sshd_config文件并设置了这两个文件 PasswordAuthentication yes PubkeyAuthentication yes 但是,当我尝试连接时,我不断收到以下消息: Error: 'Remote SSH server does not allow password authentication. Allowed types are: u'publickey'' 我怎样才能设置服务器,以便它接受这两种types的身份validation? 注意:我正在使用Ubuntu。

ssh:无法parsing主机名add:名称或服务未知

我创build了非sudo用户,并且在login时不能添加ssh密钥: % ssh -vvv add ~/.ssh/mykey OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * ssh: Could not resolve hostname add: Name or service not known Ubuntu 14.04,干净的安装后没有改变SSHconfiguration。 当我添encryption钥login为sudo用户时,一切都很好。 我试图做 % eval `ssh-agent -s` Agent pid 18372 但是, ssh add在此之后显示相同的错误。

debuggingSSH不连接

我试图连接到远程服务器使用SSH,但我有Permission denied (publickey). 。 我已经经历了所有可能的原因,我可以build议和其他问题的build议。 我确信我的密钥是正确的,我检查了很多次,并且能够使用该密钥从其他机器login到目标服务器; 我将一个文件的权限设置为700 那么,什么给ssh -v : OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 debug1: Reading configuration data /root/.ssh/config debug1: Applying options for fmbnew debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to –myhost– [–myip–] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file "~/.ssh/host-key" type -1 […]

哪个公共rsa键属于哪个秘密?

有没有办法找出哪个公共rsa密钥属于哪个密钥? 我有两对躺在,并想知道其中一个是哪个。

SSH-KEYGEN是否安全,即使客户机被黑客攻击?

假设有客户机 – 服务器机器。 在客户机上,我们已经生成了一个SSH-KEYGEN,并在Server Machine上存储了相同的密钥。 这意味着,当客户端使用SSH连接服务器时,不需要密码。 如果客户端机器被黑客攻击,那么服务器机器容易受到所有攻击?

ssh与关键内容而不是identity_file

而不是ssh -i mykey.pem我想将ssh -i mykey.pem的内容 mykey.pem给ssh命令。 这有可能吗? 背景: mykey.pem以encryption方式存储。 我想解密它(在一个CI工具),并将其传递给SSH。 对其进行解密并将path传递给解密的密钥将使具有光盘访问权的人可以访问该密钥。