$awsec2instances = aws ec2 describe-instances
- install and start openssh server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Manual'
netstat -ano | findstr :22
ssh [win local account]@localhost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://objects.githubusercontent.com/github-production-release-asset-2e65be/285628618/02f45cd5-5f38-4216-a19d-97361eb7de83?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220103%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220103T133559Z&X-Amz-Expires=300&X-Amz-Signature=81e05a3741e0f506a16470ccbcb3edab04eafbfccdf9ee608d3187bf78c087c2&X-Amz-SignedHeaders=host&actor_id=991809&key_id=0&repo_id=285628618&response-content-disposition=attachment%3B%20filename%3DReset-ScanEngineVersion.ps1&response-content-type=application%2Foctet-stream | |
<# | |
MIT License | |
Copyright (c) Microsoft Corporation. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
-
stand up a domain. In this case, I'll use digiarch.net since I own this and use it for nothing.
-
stand up an ami linux server. Configure the SG to allow the following inbound (letsencrypt also uses the DNS):
- tcp 25: SMTP
- udp 53: DNS
- tcp 80: HTTP
- tcp 443: HTTPS
- download terraform
mkdir c:\terraform
[environment]::setenvironmentvariable("Path", $env:Path + ";C:\terraform", "Machine")
cd c:\terraform
invoke-webrequest -usebasicparsing https://releases.hashicorp.com/terraform/1.0.11/terraform_1.0.11_windows_amd64.zip -out terraform_1.0.11_windows_amd64.zip
Expand-Archive .\terraform_1.0.11_windows_amd64.zip -DestinationPath .
terraform tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
I know c# and always had trouble spending the time to learn full web framework and all the internals of making a web site. This didn't stop me from having ideas for sites, even easy sites.
This is my write up for notes extending the MSFT blazor tutorial: https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/run
- when attempting to
dotnet run
the blazor site, I discovered kestral (whatever that is) wouldn't bind to tcp port 5000, as noted in./BlazorApp/Properties/launchsettings.json
.
- see requirements: https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-2---update-to-wsl-2
- WSL1 vs. WSL2: https://docs.microsoft.com/en-us/windows/wsl/compare-versions
- see old write up: https://www.kali.org/news/kali-linux-in-the-windows-app-store/
- run in powershell as admin:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
wsl --set-default-version 1
- search the windows store for kali and install, or:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$body = @{ | |
"username" = "splksso@login.com" | |
"password" = "password" | |
} | |
$LoginResponse = Invoke-WebRequest 'https://api.splunk.com/2.0/rest/login/splunk' -SessionVariable 'Session' -Body $Body -Method 'POST' | |
$Session | |
$headers = @{ |