4

You get an error simply because you do not provide a valid ssh-key (publickey) and no gssapi key neither. In general it is a bad idea to allow password login (very week security). But if you really want, just add PasswordAuthentication yes in /etc/ssh/sshd_config and then restart sshd with service restart sshd edit: you really should use ssh keys


4

After discussion on https://www.reddit.com/r/ansible/comments/e9ve5q/ansible_slow_as_a_hell_with_gcp_iap_any_way_to/ I altered solution to use an SSH connection sharing via socket. It is two times faster then @mat solution. I put it on our PROD. Here is an implementation that doesn't depend on host name patterns! The proper solution is to use Bastion/Jump ...


4

I figured out a way to make this work without a connection plugin. Basically you can write a script that wraps the gcloud tool and point the ansible_ssh_executable parameter at this script, which you can define at the inventory level. You do need to make sure the gcp_compute inventory plugin identifies hosts by name, because this is what gcloud compute ssh ...


3

A packet arriving on an interface is considered "martian" if a hypothetical reply packet would be routed through a different interface. In your case 203.115.192.116 sent a packet to 10.5.0.2, which arrived on your eth0 interface. If 10.5.0.2 is your address, ip route get 203.115.192.116 correctly reports an interface different from eth0, and you actually ...


3

If you insert the directive ServerName {your server's fully qualified domain name} in either httpd.conf or apache2.conf in /etc/apache2 and restart apache the warning message will disappear. I also see the message: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Do you ...


3

After some digging, it appears that Google Cloud Platform is buggy when it comes to applying SSH keys to our Debian boxes. Adding the keys globally at a project level, or adding users manually to the Debian box, adding keys manually to authorized_keys for each user, it works. Adding them at an instance level does not work. I will be reporting the bug to ...


2

In particular, the HostName line is what allows ssh <instance>.<location>.<project>? Yes. If your ssh config has a HostName <ip address> line for a particular Host somealias stanza, then DNS is not used when you ssh somealias. Note that it is also possible to specify a FQDN for the HostName Host abc HostName alpha.beta....


2

This should answer your question directly. Should even be able to copy and paste the commands. https://rolfje.wordpress.com/2017/06/09/installing-gpg-keys-for-debian-backports/


2

You are not going to be able to establish connection to machine running colab using incoming ssh simply because this port is not exposed by the pod it runs in (read it runs behind firewall). How to setup SSHD on Colab and tunnel it through ngrok is described in details here https://stackoverflow.com/a/53252985/888545 As for better code editor you can run ...


2

Martian packets are when an expected local address is seen in that interface (e.g. packets local to the network with a different network of that packet). While it is not an advised network design, it can happen some networks have "martian" packets by design (e.g. VLANs/physical networks with several logical networks). If you are using iptables in a server,...


2

To proxy ssh traffic through a bastion/jumpbox, you need -W %h:% in your ProxyCommand line. I've provided an example ~/.ssh/config below. Host * ForwardAgent yes AddKeysToAgent yes # Bastion/jumpbox Host gcloud StrictHostKeyChecking no UserKnownHostsFile=/dev/null # Target instance Host compute.* 10.1.2.* User me IdentityFile ~/.ssh/mykey.pem ProxyCommand ...


2

In the double quoted string "select DATE(COLLECTTIME) DATE,count(distinct COLLECTTIME) as record_count FROM `${project_id}.Test_INGEST.${test_tablename}` where DATE(collecttime) >= '2020-12-01' group by DATE order by DATE asc;" the section `${project_id}.Test_INGEST.${test_tablename}` will be treated by the shell as a command substitution. ...


2

This is possible in bash: if the last character of an alias definition is a space (or tab), then bash will unalias the next word too: $ alias foo="echo " $ alias bar="hello " $ alias baz=world $ foo bar baz hello world Ref: 6.6 Aliases in the manual. So you can chain aliases together: but the first word must be an alias. I would not use ...


1

Epoch seconds to UTC timestamp SELECT To_Timestamp(1607043600) AT TIME ZONE 'UTC' ; ------------------------ 2020-12-04 01:00:00 UTC timestamp to Epoch seconds SELECT Extract(epoch From '2020-12-04 01:00:00'::TIMESTAMP) ; ------------ 1607043600


1

On CentOS the manpages are separate from the man command. On CentOS7 the command yum install man-db will install the man software and the few man pages related to it (e.g. manpath.1, whatis.1). Other packages may have also installed their own manpages. However the traditional core set of manpages are in a different package; man-pages. The command yum ...


1

I figured out working syntax, I can connect directly to the gcloud compute instance using the name by adding to my ssh config: Host gcloud User me ProxyCommand gcloud compute --project "myproject" ssh --zone "myzone" me@gcloud --command="nc 0.0.0.0 22" Now I can say ssh gcloud To use it as a jumpbox I can add to my config Host *.gc User me ...


1

On Linux, when using an encrypted disk (luks), it is unlocked at boot time with a password the idea here is to encrypt the disk with cryptsetup on top of the google system (default encryption) and get an earlier access to the instance to be able to unlock the drive at the boot time. This can be implemented with the help of the remote serial console feature (...


1

OpenSSH, the suite that brings sftp, has support for GSSAPI, which defines mechanisms you are looking for. Kereberos can be used as an implementation. LDAP would be another approach you can take.


1

SFTP will usually go into PAM (pluggable authentication modules). Your out-of-the-box PAM configuration will probably just look at /etc/passwd and friends, but there are PAM modules that authenticate against LDAP or Kerberos (Active Directory) instead. There's also sssd, an Identity Management daemon from the RedHat world which can look at LDAP and/or ...


1

Instead of adding gcloud to programs.zsh.ohMyZsh.plugins, I found that I had to manually source the completion script. To do this: Add pkgs.google-cloud-sdk to environment.systemPackages of your configuration.nix file, and then update the zshrc section: programs.zsh.promptInit = '' export CLOUD_SDK_HOME="${pkgs.google-cloud-sdk}" source "$...


1

Thanks for posting these @gavenkoa and @matt. One suggestion is to add the following so you don't need to hard code the zone. Snippet: ZONE=$(gcloud compute instances list --filter="name:${host}" --format='value(zone)') gcloud_args=" --tunnel-through-iap \ --zone=${ZONE}


1

Welcome to unix.SE. The application (vsftp) has already opened the directory. To the application, the opened directory is represented by a file descriptor (or "handle"). The directory may be renamed (or moved on the file-system), but this will not invalidate the descriptor. In case of vsftp, the directory is probably also the working directory, which vsftp ...


1

The current Cloud Shell creates a private VM, for maximum flexibility. But the actual shell it shows you is running inside a container. The container is very privileged, but since it uses a separate PID namespace you cannot see the processes outside the container. $ amicontained Container Runtime: kube Has Namespaces: pid: true user: false ...


1

As surmised by @cas in the comments, I'm writing it to a folder that doesn't exist. Once I changed the path to /mnt/subway-explorer-datastore, it worked correctly. Recall the error message: scp: /mnt/subway-explorer-datastore: Read-only file system This is misleading! Reading this response I assumed (since scp can't create folders) that the folder existed,...


1

PORT 10,142,0,2,204,3 This command says that the server should connect to the IP address 10.142.0.2 for the data transfer. This IP address is a private IP and cannot be routed over the internet. It is only valid in your local network. This kind of problem is common for FTP. If the client is inside a local network but the server is in a public network you ...


1

You can scan those nodes on opened ports with nmap. It should be reliable, if those services use standard application ports. There is simple example of nmap usage: nmap -sS -O server.mydomain ... PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 111/tcp open rpcbind 514/tcp open shell 2301/tcp open compaqdiag 2381/tcp open compaq-https ......


1

It looks like your Strongswan VPN client is behind a firewall or a NAT device which, after a moment of inactivity, drops the "connection" (it's probably UDP here, the term "connection" is not a good choice). Any incoming data belonging to that connection is then considered as invalid and is dropped (you may have a line about this in your FW/NAT device logs). ...


1

Your best bet is to create the key manually with the gcloud console: thufir@mordor:~$ thufir@mordor:~$ gcloud compute config-ssh WARNING: The private SSH key file for Google Compute Engine does not exist. WARNING: You do not have an SSH key for Google Compute Engine. WARNING: [/usr/bin/ssh-keygen] will be executed to generate a key. Generating public/...


Only top voted, non community-wiki answers of a minimum length are eligible