ssh

ssh -i 密钥文件无法登陆问题

不羁岁月 提交于 2020-01-30 21:17:01
一、用ssh 带密钥文件登录时候,发生以下报错 [root@99cloud1 ~]# ssh -i hz-keypair-demo.pem centos@172.16.17.104 The authenticity of host '172.16.17.104 (172.16.17.104)' can't be established. ECDSA key fingerprint is SHA256:HXYEa2IVBhTJ1AO+GDvROEvHM5ZRLgKxXsSaFmc6CNc. ECDSA key fingerprint is MD5:cd:dd:3f:dd:66:91:30:4c:0e:e5:a2:35:45:c2:23:41. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '172.16.17.104' (ECDSA) to the list of known hosts. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Metasploit使用教程(一)

扶醉桌前 提交于 2020-01-30 19:02:19
Step1:启动postsql数据库 root@kali:~# service postgresql start Step2:初始化msf数据库 root@kali:~# msfdb init [i] Database already started [+] Creating database user 'msf' [+] Creating databases 'msf' [+] Creating databases 'msf_test' [+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml' [+] Creating initial database schema Step3:进入msf控制台 root@kali:~# msfconsole MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMM MMMN$ vMMMM MMMNl MMMMM MMMMM JMMMM MMMNl MMMMMMMN NMMMMMMM JMMMM MMMNl MMMMMMMMMNmmmNMMMMMMMMM JMMMM MMMNI MMMMMMMMMMMMMMMMMMMMMMM jMMMM MMMNI

Sharing SSH keys

让人想犯罪 __ 提交于 2020-01-30 17:37:19
问题 I use a private SSH key and passwordless entry for a number of user accounts on a server that hosts a number of websites. I use the same private key for each user account. (because I'm lazy? or is that the "right" way). I now want to authorise another trusted computer in a different part of the country. If I copy the contents of my ~/.ssh onto that machine will that work without any other set up? Will both machines be able to maintain a connection at the same time? 回答1: This should work, and

Sharing SSH keys

妖精的绣舞 提交于 2020-01-30 17:36:49
问题 I use a private SSH key and passwordless entry for a number of user accounts on a server that hosts a number of websites. I use the same private key for each user account. (because I'm lazy? or is that the "right" way). I now want to authorise another trusted computer in a different part of the country. If I copy the contents of my ~/.ssh onto that machine will that work without any other set up? Will both machines be able to maintain a connection at the same time? 回答1: This should work, and

Sharing SSH keys

社会主义新天地 提交于 2020-01-30 17:36:21
问题 I use a private SSH key and passwordless entry for a number of user accounts on a server that hosts a number of websites. I use the same private key for each user account. (because I'm lazy? or is that the "right" way). I now want to authorise another trusted computer in a different part of the country. If I copy the contents of my ~/.ssh onto that machine will that work without any other set up? Will both machines be able to maintain a connection at the same time? 回答1: This should work, and

远程服务器无密登入设置

我的未来我决定 提交于 2020-01-30 14:25:28
现在还在输密码进入服务器的话,如果频次高的话,显得就很浪费时间。实际上可以通过无密登陆服务器,只需要设置好ssh就可以,这样只要你打开你电脑的终端不管是Mac OS还是Linux输入ssh root@远程服务器IP,这个命令就会自动登陆到远程服务器上,也就不必要记什么密码,而且有的时候记不住经常搞混,登陆不上去很尴尬。实际上原理也不复杂,就是你把你本地(机)的公钥给远程服务器注册一下,等下一次登陆验证就验证ssh就可以了。 环境: macbook(实际上你用的是linux也一样,至于windows 的windows terminal终端没有实践过) 阿里云CentOS 操作: 步骤一:本地(机)生成公钥------(如果本地有的话直接拷贝公钥就可以) 1 检查是否有密钥 首先你要看所在的这台机有没有现成的公钥,可以先看看你本地的.ssh目录有没有 ls - a ~ / . ssh 2 生成ssh密钥 看到有pub公钥文件就说明你已经生成过本地的ssh密钥对了,直接跳过下一步 若果你没有生成密钥对或者想重新生成,可以输入命令 ssh - keygen - t rsa 3 输出复制密钥 实际上你也可以通过vim来打开公钥文件,但是我们可以通过cat命令输出更直接,复制里面的内容就可以 cat ~ / . ssh / id_rsa . pub 要复制返回的结果,要复制返回的结果

How to establish ssh key pair when “Host key verification failed”

只愿长相守 提交于 2020-01-30 13:59:51
问题 I have set up ssh key pairs between my desktop and two servers, and from the servers to my desktop, but after reinstalling the OS on my desktop, I can't re-establish the keypair going into my desktop by this: mkdir ~/.ssh chmod 700 ~/.ssh ssh-keygen -t ssh-copy-id username@server I get the following error: (names in italics changed to protect the innocent My desktop is Ubuntu, and I can't find the answer here) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST

How to establish ssh key pair when “Host key verification failed”

廉价感情. 提交于 2020-01-30 13:59:11
问题 I have set up ssh key pairs between my desktop and two servers, and from the servers to my desktop, but after reinstalling the OS on my desktop, I can't re-establish the keypair going into my desktop by this: mkdir ~/.ssh chmod 700 ~/.ssh ssh-keygen -t ssh-copy-id username@server I get the following error: (names in italics changed to protect the innocent My desktop is Ubuntu, and I can't find the answer here) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST

二。硬件的选择与系统的安装

删除回忆录丶 提交于 2020-01-30 10:16:32
既然是作为NAS服务器,硬盘就一定要大,而硬盘如果要大的话,可能需要主板有相应的支持,最好是集成显卡,降低负载和成本。这部分,我没有太深入的研究,只是在这里提个醒,我目前的机器是赛扬+512内存+1T硬盘,目前来看,运行还是很稳定的,支撑常用的服务也没有问题。 操作系统选择ubuntu ,选择这个系统的主要原因是,这个系统主要支持桌面应用,而红帽比较适合企业应用,企业级的服务多一些。 有几个是最常用的知识,没有的软件安装或者更新,apt-get, apt-get install 更新系统的话apt-get upgrade 如果,更新某一个软件的话 apt-get upgrade 软件名,这个可以用通配符 敲不出来命令,就按tab,或者按两下 这些常用Linux的人,都很熟悉,但是,新手的话,还是很有用的 装上显示器,键盘,鼠标,键盘鼠标,建议用USB的。操作系统正常安装,没有什么特别需要注意的。安装完成之后,有几个修改需要进行: 1.以文字方式启动,由于NAS是完全通过网络访问的,因此机器以图形方式启动,完全没有必要,只能占用不必要的资源 2.运行root用户登录。ubuntu默认是关闭root用户的,主要是出于安全考虑,由于NAS是在内网家用,而不同的用户必然会带来权限方面的问题,因此,出于以后使用和维护的便利,还是把root用户打开比较好 3.测试ssh连接是否可以

Windows系统中Xshell与Linux连接时遇到的问题

谁说胖子不能爱 提交于 2020-01-30 10:01:47
前提条件:在Windows系统中已经安装了Xshell,并且安装了虚拟机软件和Linux系统 步骤1.在Linux系统中root用户下,使用ifconfig命令查看虚拟系统Linux的IP地址。如图1                图1 步骤2.打开Xshell,创建连接,在新建会话属性对话框中,登记连接的名字,选择使用的协议,以及需要连接的虚拟机IP地址。如图2           图2 当连接建立好,只需根据提示输入用户名和密码就可以在Xshell终端使用Linux系统。 下面讨论当连接不能连接时,需要在哪许方面找原因: 原因1:虚拟机网络连接方式不对进入虚拟机设置查看网络适配器的连接方式 是NAT还是桥接模式 首先,将连接方式设置为桥接模式,进行步骤1和步骤2. 如果不能连接,则将连接模式设置为NAT,在Linux中使用命令vi /etc/ssh/sshd_config编辑sshd_config,将原先的PermitRootLogin without_password修改为PermitRootLogin yes如图3。 还可以使用命令update-rc.d ssh enable,使得ssh服务开机后自启动。              图3 然后在windows中的命令提示符下使用ipconfig查看虚拟网卡的IP地址,看是否与虚拟机的IP地址处于同一网,如果不处于同一网络