记一次 Vultr配置

这里不想排版,因为心情复杂。

第一次搞这个VPS,真的是很气人,由于中英文的关系我一开始就误操作了,让VPS一直挂载着Ubuntu18.10,所以系统一直是在光盘的引导界面,这个问题知道我注册后的四个小时才知道!

还有,就是它有一个活动,充十块充五十块,这个下面有一个大大的Remove,千万别去点到,不然你就没有了,郁闷。

去掉光盘挂载以后,就能进系统并且SSH登陆配置了。

//SSH登陆 (这里使用Xshell6) 百度即可
//安装宝塔:
//SSH终端输入一句话就行了,复制下面然后粘贴回车。
yum install –y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh

问题解析: 为什么下载了SSH登陆客户端却显示网络中断?

这个问题对我来说没什么卵用,因为我根本不是出的这个错误,不过还是分享一下。

原帖:https://stackoverflow.com/questions/53099865/connection-closed-by-xx-xx-xx-xx-on-port-22

0

I'm trying to connect to a distant server from a Mac device. When I type the ssh command:

ssh [email protected]

I receive this error:

Connection closed by xx.xxx.xxx.xx port 22

I was told to restart ssh this way : service sshd restart but when I execute it, I'm told that service is not found.

I'm a newbie and I know that I'm missing something. Your help would so welcome.

Regards!

  • 1
    this may be better for unix SE or super user SE - that aside. I get this sometimes when the server you're connecting to is on a different port from 22. Also that restart command should be run on the server - not your machine – treyBake Nov 1 '18 at 12:19
  •  
    @ThisGuyHasTwoThumbs How can I run it on the server while I can't connect to it? – zakaria mouqcit Nov 1 '18 at 13:28
  •  
    is it an external server you have no control over? – treyBake Nov 1 '18 at 13:29
  •  
    Yes it's an external server that I can only access to it via terminal or filezilla. While I can't connect I can do nothing. – zakaria mouqcit Nov 1 '18 at 13:30
  •  
    is it a hosting company-controlled server? – treyBake Nov 1 '18 at 13:35
 
-2
 
  1. Check the server computer is opened 20 port

Windows - [run -> cmd -> type this string]

       netstat -an 

Linux - [in terminal]

      netstat -nap

type this string in your server computer what you have you can check what port is opened




  1. let server computer allow access port 22

Windows

goto Firewall -> advanced settings -> Inbound rules -> new rules -> add port tcp/22

Linux

iptables -I INPUT 1 -p tcp --dport 22-j ACCEPT 

iptables -I OUTPUT 1 -p tcp --dport 22-j ACCEPT 

you have to do by root

  •  
    Can you please tell me how? – zakaria mouqcit Nov 1 '18 at 11:12
  •  
    @TwolceFish Welcome to StackOverflow. When you answer a question on StackOverflow, Please make sure that you understand all possible scenarios of the problem, explain the reason of the problem, and then propose a solution. If you think the problem in the question as you understand is too little to be discussed as an answer, put it as a comment. This link would help you: stackoverflow.com/help/how-to-answer – Aditya Nov 1 '18 at 11:17
  • 1
    @Aditya ok it is my mistake – TwoIceFish Nov 1 '18 at 12:07

猜你喜欢

转载自www.cnblogs.com/lingqingxue/p/10888821.html
今日推荐