Permission denied (publickey,gssapi-keyex,gssapi-with-mic). GCP - google-cloud-platform

I launched a VM with CentOS 7. I configured a GUI and a xrdp with the next .sh file:
#!/bin/sh
#Install​ EPEL and nux Desktop repository rpms
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
#Install​ xfce desktop to get the graphical user interface
yum groupinstall -y "Xfce"
#command​ to change the reboot from CLI to GUI
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
#create xfce clients
echo "xfce4-session" > ~/.Xclients
chmod a+x ~/.Xclients
#Install​ the xrdp
yum -y install xrdp tigervnc-server
#start​ the xrdp service
systemctl start xrdp.service
#enable​ the xrdp service
systemctl enable xrdp.service
Everything works fine, i can reach that VM via rdp from my computer, but when i'm in the vm and i try to acces to another vm's in the same project this error appear:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
But it only happens when i try with the vm terminal, if i access from the google ssh client i can access to the other virtual machines without problem.
Another thing: I access to the VM rdp with root user, this could be the problem?
Any ideas?

Related

How to: Connecting a Instance (Virtual Machine from Google Cloud Service) with local runtime from Google Colab

I just struggled for 3 days to get this to work but many of the sources that explain it are somehow misleading. Therefore I share that now.
I was using windows and used the Windows 10 Subsystem for Linux to operate from there:
(instruction on how to activate you can find here https://learn.microsoft.com/en-us/windows/wsl/install-win10)
I first created a virtual machine on google cloud called colav-vm in the geographic zone us-east4-c
Start the VM in google cloud
Opened Ubuntu Linux Terminal:
Type:
gcloud compute ssh colav-vm --zone=us-east4-c -- -L 8888:locahost:8888
Enter Password to connect to it
Install pip:
(found it here: https://askubuntu.com/questions/672808/sudo-apt-get-install-python-pip-is-failing)
(In the connected terminal from the VM)
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python-pip
- Install jupyter_http_over_ws
sudo -i pip install jupyter_http_over_ws
- Run the jupyter-server still on the connected VM:
jupyter serverextension enable --py jupyter_http_over_ws
jupyter notebook \
--NotebookApp.allow_origin='https://colab.research.google.com' \
--port=8888 \
--NotebookApp.port_retries=0
(this should be also a code cell - but the formatting doesn't let me)
Then go to the browser on your local computer and type in " http://localhost:8888/ " to open a Jupyter environment if you have it installed - or go to google Colab and connect to runtime on the top right and type it in there and connect (there you need to add the full line including the token like that:
http://localhost:8888/?token=bd391421b3ec5c08f35ef28e2eb9d01fab6501e341c82e35)
I hope this saves some people some time.
The original sources are from here:
https://research.google.com/colaboratory/local-runtimes.html
https://medium.com/#yufengg/how-to-upgrade-colab-with-more-compute-64d53a9b05dc
(but somehow it confused me and it didn't work for me at least)

start cassandra on google cloud on debian vm

I have created a Debian VM and followed the steps to install cassandra on it. In the end, when I ran sudo apt update
sudo apt install cassandra
cassandra was installed and also automatically started.
However, cassandra wasn't added to PATH. I stopped cassandra using ps -aux|grep cassandra and kill pid. Now when I am trying to start it again using cassandra -f, I am getting several permission denied errors. eg
/usr/sbin/cassandra -f
OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied
I can try using -R option and start Cassandra as root but it is not recommended. How can I start cassandra as normal user?

Unable to start VM - Minikube

I am trying to start the minikube using the minikube start command and this is the error i am getting. Even installed the latest version of virtual box but still it gives me this error.
Can someone please tell me why this is happening?
Follow the advice of the error message. Did you try installing virtualbox-dkms and the linux headers?
$ sudo apt update
$ sudo apt install virtualbox-dkms linux-headers-generic
Follow the instructions in the docs, if you aren't already: https://kubernetes.io/docs/tasks/tools/install-minikube/
First of all I would recomend you to install newest version of Minikbue (currently it is 1.5.2) and Kubectl.
Second thing check if your machine is supporting virtualization. It can bo done via command egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no.
If it is no you have to:
If you are running within a VM, your hypervisor does not allow nested virtualization. You will need to use the None (bare-metal) driver.
If you are running on a physical machine, ensure that your BIOS has hardware virtualization enabled.
Minikube set VirtualBox as default driver, but you can use other. Here under Hypervisor Setup you might find that you can also use KVM or None as driver for Linux OS.
Solutions:
1. As Minikube output advised, try to install
- $ sudo apt-get install virtualbox-dkms linux-headers-generic
- run $ sudo modprobe vboxdrv
- reinstall VirtualBox
2. If there is no virtualization option on your Laptop you can use Minikube with --vm-driver=none flag.
$ sudo minikube start --vm-driver=none
If you would use this option, you might need to specify --cpus=X and --memory=XXXX as default is requesting less resources.
Another think is that none driver provides limited isolation and may reduce system security and reliability. More info can be found here.
$ minikube start
😄 minikube v1.5.2 on Ubuntu 18.04
🔥 Creating virtualbox VM (CPUs=2, Memory=2000MB, Disk=20000MB)
...
$ sudo minikube start --vm-driver=none
😄 minikube v1.5.2 on Ubuntu 18.04
🤹 Running on localhost (CPUs=2, Memory=7470MB, Disk=9749MB) ...
After successfull installation, don't forget to execute mentioned commands.
▪ sudo mv /home/<your_user>/.kube /home/<your_user>/.minikube $HOME
▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube

UI of IPA server is not coming up on AWS ec2 instance?

I have installed the IPA server on AWS EC2 instance by the following method:
Updated the /etc/hosts file
Installed the software:
yum install ipa-server ip-server-dns bind bind-dyndb-ldap yum install ipa-server-dns
iptables --flush
firewall-cmd --permanent --add-port={80/tcp,443/tcp,389/tcp,636/tcp,88/tcp,464/tcp,53/tcp,88/udp,464/udp,53/udp,123/udp}
firewall-cmd --reload
Ran the following command:
ipa-server-install —setup-dns
After successful installation ran kinit admin
I am still unable to see the ui in my browser.
When I checked it found out that dirsrv and ipa_memcached services are not running. How can I enable those services and see the IPA server UI?

RDP into Linux Instance AWS

I am new to AWS.
I created a Linux free tier instance and its up and running as i am able to access it via ssh putty as i am a windows user.
Now, I wanted to RDP the Linux Instance to see the interface but i am unable to do so. I am unable to find any option for that.
As per my understanding by reading online forms, it is not possible to RDP LinuxInstance on AWS.
If anyone can give there expert opinion if it is possible to RDP the Linux Instance? If not then Is there any way I can access the graphical interface for Linux Instance in AWS or I just have to work with command line interface from my local machine?
Amazon had a page that described how to do this with various linux versions but they took it down. Here are the steps for Linux 16.04. I just did this on a new ubuntu ec2 instance and it worked fine.
sudo apt update && sudo apt upgrade
sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
sudo passwd ubuntu
sudo apt install xrdp xfce4 xfce4-goodies tightvncserver -y
echo xfce4-session> /home/ubuntu/.xsession
sudo cp /home/ubuntu/.xsession /etc/skel
sudo sed -i '0,/-1/s//ask-1/' /etc/xrdp/xrdp.ini
sudo service xrdp restart
RDP is a proprietary protocol developed by Microsoft, Linux servers do not come in with GUI, you need to SSH into Linux box and then install packages to enable desktop GUI functionality
Here is an article from AWS
https://aws.amazon.com/premiumsupport/knowledge-center/connect-ec2-centos-windows/
Note: Amazon Linux does not provide any desktop GUI functionality
try install GNOME packages i.e.,
$sudo yum -y groupinstall "Server with GUI"
$sudo systemctl enable xrdp; systemctl start xrdp
now try login from your windows machine using "windows remote desktop or any vnc client