Pairup with Tmux and Ngrok - pair-programming

I'm having a little trouble getting my client to connect. I'm able to have ngrok tell me the port, but when I go to the client and execute:
ssh pairup#ngrok.com -p 57613
I get
ssh_exchange_identification: Connection closed by remote host
Any ideas why this is happening? I'm on a Mac, and I followed these steps: https://www.adaptivelab.com/blog/pair-programming-with-tmux/
Thanks a lot for your time

It could be that you don't have the ssh server installed on the machine you're running ngrok, so, the connection is refused.
To install it just type the following in a terminal:
sudo apt-get install openssh-server

Related

LXD/LXC install issue with snap

I am on Ubuntu 18.04 and when I install LXD with sudo snap install lxd the install is broken somehow and somewhere.
i.e lxc list returns
Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: connection refused
BUT
/snap/bin/lxc list works fine.
Can someone crafty with SNAPS help me out here so that I can just use lxc instead of /snap/bin/lxc

How to use socks proxy via CLI without proxychains (to install proxychains)

I am unable to install proxychains on a remote system because the system only has outbound access to port 22/tcp to my server. However, I can use ssh -D 9050 root#myip to listen on port 9050 for socks proxy.
That being said, how can I run apt update and apt install proxychains through socks port 9050 so that I can install proxychains and use it for future commands?
I've tried to run:
export http_proxy=socks5://127.0.0.1:9050 https_proxy=socks5://127.0.0.1:9050
but as soon as I ran apt update, the outbound connection fails. Not sure if this is the correct way to do it or if I'm just missing something small.
One solution I was able to use is by downloading the ZIP version of https://github.com/rofl0r/proxychains-ng, SCP'ing it over to the remote server, and then compiling it locally on that system.
Afterwards, I'm able to use ./proxychains4g -f src/proxychains.conf <command> and so now it looks like I'm good to go.

Raspberry Pi Connection closed SSH

I just bought a raspberry Pi 3. I am trying to run it but first it wrote connection refused on ssh attempt. After I ran the raspi-config and enabled the ssh I now get a Connection closed by 192.168.0.31. When I scan the ports on that machine the 22/tcp is open (using nmap).
What could be the problem?
I just found this solution, now the ssh works:
sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server
I was also getting the same problem.
So I tried the following solution.
1. Try to create an empty SSH file without any extension in RPI bootable file.
2. Try to execute sudo systemctl enable ssh
sudo systemctl start ssh during boot time, using .bashrc file

Azure VM with Docker failing to connect

I'm trying to write a Powershell script to create a VM in Azure with Docker installed. From everything I've read, I should be able to do the following:
$image = "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_3-LTS-amd64-server-20150908-en-us-30GB"
azure vm docker create -e 22 -l 'North Europe' --docker-cert-dir dockercert --vm-size Small <myvmname> $image $userName $password
docker --tls -H tcp://<myvmname>.cloudapp.net:4243 info
The vm creation works, however the docker command fails with the following error:
An error occurred trying to connect: Get https://myvmname.cloudapp.net:4243/v1.20/info: dial tcp 40.127.169.184:4243: ConnectEx tcp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Some articles I've found refer to port 2376 - but that doesn't work either.
Logging onto Azure portal and viewing the created VM - the Docker VM Extension doesn't seem to have been added and there's no endpoints other than the default SSH one. I was expecting these to have been created by the azure vm docker create command. Although I could be wrong with that bit.
A couple of example article I've looked at are here:
https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-docker-with-xplat-cli/
http://blog.siliconvalve.com/2015/01/07/get-started-with-docker-on-azure/
However, there's plenty of other articles saying the same thing.
Does anyone know what I'm doing wrong?
I know you are doing nothing wrong. My azurecli-dockerhost connection had been working for months and failed recently. I re-created my docker host using "azure vm docker create" but it does not work any more.
I believe it is a bug that the azure-docker team has to fix.
For the time being, my solution is to:
1) Launch a Ubuntu VM WITHOUT using the Azure docker extension
2) SSH into the VM and install docker with these lines:
sudo su; apt-get -y update
apt-get install linux-image-extra-$(uname -r)
modprobe aufs
curl -sSL https://get.docker.com/ | sh
3) Run docker within this VM directly without relying on a "client" and in particular the azure cli.
If you insist on using the docker client approach, my alternative suggestion would be to update your azure-cli and try 'azure vm docker create' again. Let me know how it goes.
sudo su
apt-get update; apt-get -y install nodejs-legacy; apt-get -y install npm; npm install azure-cli --global
To add an additional answer to my question, it turns out you can do the same using the docker create command ...
docker-machine create $vmname --driver azure --azure-publish-settings-file MySubscription.publishsettings
This method works for me.

Unable to ssh login from windows to ubuntu

I am trying to login on my ubuntu server from windows pc using putty ssh but it says connection refused.
I am able lo login on ubuntu using command
$ ssh root#MY-IP-ADDRESS
not able to login using remote server.
Please Help me.
I was having the same issue and nothing was working for me to connect to ec2 linux instance from Windows 7. Here is how i was finally able to connect.
1.) Download puttygen.exe and create a .ppk file from your .pem file that you downloaded from amazon.
2.) Use FireSSH (plug-in for Firefox), put in your host name, use 'ubuntu' (minus the quotes) for the Login, leave password blank and enter the location of the .ppk you created from puttygen.exe
Note: Oddly enough i was not able to connect using putty.exe but the private key it generates works fine with FireSSH
Did you install openssh-server ?
aptitude install openssh-server
Then also check you don't have firewall running on your Ubuntu.

Resources