Skip to content

Instantly share code, notes, and snippets.

Avatar

Yuriy Golikov meetmatt

View GitHub Profile
View strace-ssh-client.log
00:05:32 execve("/usr/bin/ssh", ["ssh", "-v", "root@10.10.0.75", "-p", "2222"], 0x7fff1a744028 /* 16 vars */) = 0
00:05:32 brk(NULL) = 0x56208d3ff000
00:05:32 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffdcdc36cc0) = -1 EINVAL (Invalid argument)
00:05:32 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
00:05:32 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
00:05:32 fstat(3, {st_mode=S_IFREG|0644, st_size=36797, ...}) = 0
00:05:32 mmap(NULL, 36797, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1051810000
00:05:32 close(3) = 0
00:05:32 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
00:05:32 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@p\0\0\0\0\0\0"..., 832) = 832
View strace-sshd-server.log
23:50:16 execve("/usr/sbin/sshd", ["/usr/sbin/sshd", "-r", "-d", "-p", "2222"], 0x7ffc48636e98 /* 26 vars */) = 0
23:50:16 brk(NULL) = 0x55897abb0000
23:50:16 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffce89a89a0) = -1 EINVAL (Invalid argument)
23:50:16 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
23:50:16 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
23:50:16 fstat(3, {st_mode=S_IFREG|0644, st_size=23216, ...}) = 0
23:50:16 mmap(NULL, 23216, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f73d378e000
23:50:16 close(3) = 0
23:50:16 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
23:50:16 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 ;\0\0\0\0\0\0"..., 832) = 832
@meetmatt
meetmatt / openstack-ssh-issue.md
Last active Jul 22, 2021
openstack - cannot ssh from host to vm instance
View openstack-ssh-issue.md

Setup

Host: Ubuntu 20.04
OVS bridge: br-ex
Openstack security group: allow all ip4.
Single network interface: 192.168.1.100, gateway 192.168.1.1 (home router).
The IP from the physical interface is moved to br-ex, physical nic added as port (that way I can allocate floating IPs from the home router's network 192.168.1.1/24).
Openstack: two networks, private (10.10.0.0/24), public (192.168.1.1/24).
Virual router (10.10.0.1 / 192.168.1.212) provides NAT to private network.
On the openstack host there's a manually added routing table: 10.10.0.0/24 via 192.168.1.212.
Instance: 10.10.0.135, Ubuntu 20.04 cloud image, default cloud config, except that I enabled root password to debug.

@meetmatt
meetmatt / openstack-single-node-microstack.sh
Last active Jul 15, 2021
Scripted version of the how-to article by Rodrigo Nascimento "OpenStack Single-Node (MicroStack)" https://connection.rnascimento.com/2021/03/08/openstack-single-node-microstack/
View openstack-single-node-microstack.sh
#!/bin/bash
### Setup
# install microstack from snap
sudo snap install microstack --devmode --beta
sudo microstack init --auto --control
sudo snap alias microstack.openstack openstack
sudo snap alias microstack.ovs-vsctl ovs-vsctl
View Emulate Github Webhook
url -kvX POST -A "GitHub-Hookshot/github" -H "Content-Type:application/json" -H "X-Github-Event:push" -d @hook.json $URL
@meetmatt
meetmatt / gist:d5dd2ecae37fbabb483dffba2d6dbec6
Created Nov 3, 2016
Show installed packages reverse sorted by size in alpine
View gist:d5dd2ecae37fbabb483dffba2d6dbec6
apk info | xargs -n1 -I{} apk info -s {} | xargs -n4 | awk '{print $4,$1}' | sort -rn