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
Related
I'm trying to connect a Raspberry Pi 3 to my VPN.
The VPN server is installed on a pfSense Apliance.
I followed the tutorial on this link to install and configure the VPN on the Raspberry Pi.
However, in place of the firewall files that the tutorial suggests, I put in the "/etc/openvpn" folder a file that I generated through the pfSense interface (.ovpn extension), in the VPN>OpenVPN>Client Export option.
After following all the installation steps and starting the VPN service, I get these errors in the system log:
System Log
First you install openvpn
sudo apt install openvpn
make your openvpn file from your pfsense server (client export)
insert the text inside a file in:
/etc/openvpn/client, like this:
sudo nano /etc/openvpn/client/newfile.ovpn
Also you may autostart openvpn if you like
Edit this file:
sudo nano /etc/default/openvpn
and uncomment, or remove, the “#” in front of
AUTOSTART="all"
I'm using Ubuntu (VERSION="20.04 LTS (Focal Fossa) on Windows 10. Itried to install Docker.
I'm following the Docs from docs.docker.com:
I run the two commands:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
When I run the second command it return an error:
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
I looked in internet I found that some links trying to resolve the issue but in vein.
gpg: can't connect to the agent: IPC connect call failed
https://michaelheap.com/gpg-cant-connect-to-the-agent-ipc-connect-call-failed/
Someone have a suggestion please ?
Thanks
The temporary workaround mentioned on the issue thread at https://github.com/microsoft/WSL/issues/5125#issuecomment-625985191 worked for me. Run the commands
wget https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo dpkg --install libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo apt-mark hold libc6 #to avoid further update
Edit: /var/lib/dpkg/info/libc6:amd64.postinst and remove the sleep 1 like so:
Change this:
To this:
I have managed to install docker into my machine which is using Windows 7. My machine is under corporate network. As i am trying to learn docker i was following this guide. When my Dockerfile is executing:
RUN apt-get -y update && apt-get install -y fortunes
which is perform ubuntu update and installing fortunes i get the following error:
cannot initiate the connection to archive.ubuntu.com:80. and - connect <101:network is unreachable>
In order to solve my problem, first i connected to my vm machine and i located the /etc/resolv.conf file where i modify it to add google dns
namespace 8.8.8.8
but that seems to not solve the issue when i exited and rebuild my Dockerfile.
As my machine is on windows i haven't found a solution for this problem. Does anyone know how should i surpass this problem?
You have to start your dockerd (docker daemon) with same nameserver of your windows computer network settings and then your container and image will get the connectivity from outside network/internet.
For more details Please visit this official link from docker :https://docs.docker.com/docker-for-windows/#network
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.
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