n0pe-sled/Postfix-Server-Setup

Can't ssh to vps after running script

recolic opened this issue · 1 comments

It seems that the script do something to iptables, and port 22 is no longer available. (vps provided by google cloud)
Here's the log.

recolic@RECOLICPC ~/tmp> ssh recolickeghart@base.tw1.recolic.net
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-1006-gcp x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu May 17 04:45:36 UTC 2018

  System load:  0.0                Processes:              98
  Usage of /:   13.6% of 24.06GB   Users logged in:        1
  Memory usage: 10%                IP address for ens4:    10.140.0.2
  Swap usage:   0%                 IP address for docker0: 172.17.0.1

 * Meltdown, Spectre and Ubuntu: What are the attack vectors,
   how the fixes work, and everything else you need to know
   - https://ubu.one/u2Know

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

 * Canonical Livepatch is available for installation.
   - Reduce system reboots and improve kernel security. Activate at:
     https://ubuntu.com/livepatch

4 packages can be updated.
3 updates are security updates.


Last login: Tue May 15 15:56:06 2018 from 58.19.17.217
Welcome to fish, the friendly interactive shell
recolickeghart@ali-docker-builder ~> ls
agent-demo/  docker/  services/  snap/
recolickeghart@ali-docker-builder ~> curl ^C
recolickeghart@ali-docker-builder ~> wget 'https://github.com/n0pe-sled/Postfix-Server-Setup/raw/master/ServerSetup.sh'
--2018-05-17 04:45:44--  https://github.com/n0pe-sled/Postfix-Server-Setup/raw/master/ServerSetup.sh
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/n0pe-sled/Postfix-Server-Setup/master/ServerSetup.sh [following]
--2018-05-17 04:45:45--  https://raw.githubusercontent.com/n0pe-sled/Postfix-Server-Setup/master/ServerSetup.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.192.133, 151.101.128.133, 151.101.64.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.192.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15747 (15K) [text/plain]
Saving to: ‘ServerSetup.sh’

ServerSetup.sh                                                  100%[=====================================================================================================================================================>]  15.38K  --.-KB/s    in 0.01s   

2018-05-17 04:45:45 (1.27 MB/s) - ‘ServerSetup.sh’ saved [15747/15747]

recolickeghart@ali-docker-builder ~> chmod +x ServerSetup.sh 
recolickeghart@ali-docker-builder ~> ./ServerSetup.sh 
Please run this script as root
recolickeghart@ali-docker-builder ~> sudo ./ServerSetup.sh 
1) Setup SSH		  5) Install Mail Server   9) Install IRedMail
2) Debian Prep		  6) Add Aliases	  10) Quit
3) Ubuntu Prep		  7) Get DNS Entries
4) Install SSL		  8) Install GoPhish
Server Setup Script - Pick an option: 1
Create a User to ssh into this system securely
Enter your user name: recolic_
Adding user `recolic_' ...
Adding new group `recolic_' (1004) ...
Adding new user `recolic_' (1003) with group `recolic_' ...
Creating home directory `/home/recolic_' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
Sorry, passwords do not match
passwd: Authentication token manipulation error
passwd: password unchanged
Try again? [y/N] y
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for recolic_
Enter the new value, or press ENTER for the default
	Full Name []: 
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] Y
Server Setup Script - Pick an option: 
1) Setup SSH		  5) Install Mail Server   9) Install IRedMail
2) Debian Prep		  6) Add Aliases	  10) Quit
3) Ubuntu Prep		  7) Get DNS Entries
4) Install SSL		  8) Install GoPhish
Server Setup Script - Pick an option: 3
Updating and Installing Dependicies
IPv6 Disabled
Changing Hostname
Enter your hostname: 4
The System will now reboot!
Connection to base.tw1.recolic.net closed by remote host.
Connection to base.tw1.recolic.net closed.
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
Enter passphrase for key '/home/recolic/.ssh/id_ecdsa': 
recolic@RECOLICPC ~/tmp [130]> ssh recolickeghart@base.tw1.recolic.net
Enter passphrase for key '/home/recolic/.ssh/id_ecdsa': 
recolic@RECOLICPC ~/tmp [130]> initssh
ssh-agent already inited.
recolic@RECOLICPC ~/tmp [1]> ssh recolickeghart@base.tw1.recolic.net
Enter passphrase for key '/home/recolic/.ssh/id_ecdsa': 
Received disconnect from 35.194.218.194 port 22:2: Too many authentication failures
Disconnected from 35.194.218.194 port 22
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
Enter passphrase for key '/home/recolic/.ssh/id_ecdsa': 
recolic@RECOLICPC ~/tmp [130]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.ne^C
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolic_@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ssh recolickeghart@base.tw1.recolic.net
ssh: connect to host base.tw1.recolic.net port 22: Connection refused
recolic@RECOLICPC ~/tmp [255]> ping base.tw1.recolic.net
PING base.tw1.recolic.net (35.194.218.194) 56(84) bytes of data.
^C
--- base.tw1.recolic.net ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1018ms

Unable to reproduce.