Install and Run SQL Server Docker Container on Mac Like most people, I use Mac , Windows as well Linux OS for development and testing purposes. Primarily I use Mac for Development purpose. I have few projects which uses SQL Server as…
Install and Run SQL Server Docker Container on Mac Like most people, I use Mac , Windows as well Linux OS for development and testing purposes. Primarily I use Mac for Development purpose. I have few projects which uses SQL Server as…
SQL Injection attack on Website hosted on EC2 Machine: I setup a website http://h1bsalary.online with publicly available dataset. As soon as I launched website, numerous trolls and automated bots sending traffic to identify the vulnerabilities. Safe-Guards I have taken so far :…
Getting started with AWS Data Pipeline AWS Data Pipeline is a web service that you can use to automate the movement and transformation of data. With AWS Data Pipeline, you can define data-driven workflows, so that tasks can be dependent on…
AWS SLA Summary SLA Percentages Useful Links Cloud Provider Service Availability https://cloudharmony.com/status
Remote Host Identification SSH Error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Rajus-MBP:.ssh Raju$ ssh -i Key.pem ec2-user@54.214.1.26 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is SHA256:oFgx2U4Q0KUxtFnouxHYJdLyH6qDbX/rKtsg Please contact your system administrator. Add correct host key in /Users/Raju/.ssh/known_hosts to get rid of this message. Offending RSA key in /Users/Raju/.ssh/known_hosts:1 RSA host key for 54.214.1.26 has changed and you have requested strict checking. Host key verification failed. |
Edit known_hosts and remove the offending host entry and SSH into Host Again
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Rajus-MBP:.ssh Raju$ vi known_hosts Rajus-MBP:.ssh Raju$ ssh -i Key.pem ec2-user@54.214.1.26 The authenticity of host '54.214.1.26 (54.214.1.26)' can't be established. ECDSA key fingerprint is SHA256:2VcR+DiKNRwyQwZ2LqtZ6EHxQYv5MWMAsrrI. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '54.214.1.26' (ECDSA) to the list of known hosts. Last login: Fri Jul 29 23:08:35 2016 from __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2016.03-release-notes/ 4 package(s) needed for security, out of 4 available Run "sudo yum update" to apply all updates. |
AWS VPC : VPC are tied a specific Region. You can’t have your VPC span across multiple Regions. Security Groups: Instant Level Security NACL : Subnet Level Access Control VPC-VPC: Throgh VPC Peering CIDR : /16 – First 16 Bits…
Putty Fatal Error: Network Error: Software caused connection to abort. PuTTY Fatal Error
1 2 3 4 5 |
I worked with CentOS servers from Windows PCs, and I had the same problem with PuTTY. A session didn't last more than 1-5 minutes. I tried to play with PuTTY settings (keepalives, etc.) but it didn't help at all. Finally I have found the solution for my case. I've recorded TCP dumps both on the client and the server. I've discovered that during 25-30 seconds before disconnecting there are several retransmissions of TCP segments in the client's dump (both from the client's and from the server's side) and finally PuTTY sends RST and close the session with that error. In the server's dump I didn't see any segments from the client in this period, even RST. It means that time to time no TCP segments from the client are delivered to the server and this period is about 30-60 seconds. I've recorded the case several times and always there were retransmissions and final RST from PuTTY. Probably somewhere on the route packets were dropped by network equipments. To make a workaround I've increased the maximal number of data retransmissions from the default value 5 up to 16. It could prevent PuTTY from disconnection too fast. The variable is 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpMaxDataRetransmissions'. I've added this variable manually, it wasn't initially defined in the registy of my Windows. It did help! Now I see that PuTTY hangs from time to time, but it always comes back . |
Attaching Volume to EC2 Instance To list the partitions
1 |
$ cat /proc/partitions |
major minor #blocks name 202 1 52428800 xvda1 Create a Volume in EC2 Instance and attach it to the instance.
1 |
$ cat /proc/partitions |
major minor #blocks name 202…
NGINX Protect Domain through Password It’s very easy to place a simple htpasswd-based authentication system on a domain served by nginx. To do this, you’ll want your server block to look like this:
1 2 3 4 5 6 7 8 |
server { listen 80; server_name domain.com; root /site/root; index index.html index.htm; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/htpasswd; } |
The relevant lines here are the…
Install S3CMD tools on EC2 Instance. SSH Into your EC2 Box and you run the following command to install S3CMD.
1 2 3 4 5 6 7 |
$ sudo yum install s3cmd Loaded plugins: priorities, update-motd, upgrade-helper Bad id for repo: datastax , byte = 8 amzn-main/latest | 2.1 kB 00:00 amzn-updates/latest | 2.3 kB 00:00 No package s3cmd available. Error: Nothing to do |
No REPO is available for S3CMD.
1 |
Navigate to cd /etc/yum.repos.d/ |
RUN WGET Command
1 |
[ec2-user@ip-99-999-82-777 yum.repos.d]$ sudo wget http://s3tools.org/repo/RHEL_6/s3tools.repo |
Then run your yum install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
$ sudo yum install s3cmd I have pasted my error output and successful installation output. ec2-user@ip-99-999-82-777 ~]$ cd /etc/ [ec2-user@ip-99-999-82-777 etc]$ cd yum.repos.d/ [ec2-user@ip-99-999-82-777 yum.repos.d]$ ls 10gen-mongodb.repo amzn-nosrc.repo amzn-updates.repo epel.repo amzn-main.repo amzn-preview.repo datastax.repo epel-testing.repo [ec2-user@ip-99-999-82-777 yum.repos.d]$ sudo wget http://s3tools.org/repo/RHEL_6/s3tools.repo --2014-02-16 22:25:42-- http://s3tools.org/repo/RHEL_6/s3tools.repo Resolving s3tools.org (s3tools.org)... 93.89.80.122, 2a01:348:0:6:5d59:50c3:0:b0b1 Connecting to s3tools.org (s3tools.org)|93.89.80.122|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 301 [application/octet-stream] Saving to: ‘s3tools.repo’ 100%[==================================================================>] 301 --.-K/s in 0s 2014-02-16 22:25:42 (25.1 MB/s) - ‘s3tools.repo’ saved [301/301] [ec2-user@ip-99-999-82-777 yum.repos.d]$ ls 10gen-mongodb.repo amzn-nosrc.repo amzn-updates.repo epel.repo s3tools.repo amzn-main.repo amzn-preview.repo datastax.repo epel-testing.repo [ec2-user@ip-99-999-82-777 yum.repos.d]$ sudo yum install s3cmd Loaded plugins: priorities, update-motd, upgrade-helper Bad id for repo: datastax , byte = 8 10gen | 951 B 00:00 s3tools | 1.3 kB 00:00 s3tools/primary | 1.0 kB 00:00 s3tools 3/3 Resolving Dependencies --> Running transaction check ---> Package s3cmd.x86_64 0:1.0.0-4.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================ Package Arch Version Repository Size ============================================================================================================ Installing: s3cmd x86_64 1.0.0-4.1 s3tools 91 k Transaction Summary ============================================================================================================ Install 1 Package Total download size: 91 k Installed size: 296 k Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/latest/s3tools/packages/s3cmd-1.0.0-4.1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID e612b227: NOKEY Public key for s3cmd-1.0.0-4.1.x86_64.rpm is not installed s3cmd-1.0.0-4.1.x86_64.rpm | 91 kB 00:00 Retrieving key from http://s3tools.org/repo/RHEL_6/repodata/repomd.xml.key Importing GPG key 0xE612B227: Userid : "home:mludvig OBS Project <home:mludvig@build.opensuse.org>" Fingerprint: 96c4 2afc 03b2 73a8 43e2 a964 9f7d 494d e612 b227 From : http://s3tools.org/repo/RHEL_6/repodata/repomd.xml.key Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : s3cmd-1.0.0-4.1.x86_64 1/1 Verifying : s3cmd-1.0.0-4.1.x86_64 1/1 Installed: s3cmd.x86_64 0:1.0.0-4.1 Complete! |