Questions tagged as ['ssh']
My AWS LightSail Ubuntu instances used to allow my ssh clients to stay connected forever. However, a newly created Ubuntu 20.04 instance now keeps dropping the ssh connection, even though connections on the same PC to other cloud Ubuntu instances remain uninterrupted. I am unable to tell whether it is due to inactivity.
/etc/ssh/sshd_config and the following are all unset:
#TCPKeepAlive yes ...
This might be a stupid question but I have to ask it anyway:
I already did setup an ssh public key for my client machine A. I copied the public key to the remote server, everything works fine, I can log in from machine A.
Now I also want to access that server from another machine and following best practices, I wanted to generate another key for client machine B, rather than using the key from machine ...
I installed OpenSSH on my Windows Server machine to use SSH. To test this out, I ran this command from my windows server.
scp test.txt firstname.lastname@example.org:/path
Which worked, I can see the file on unix via putty. However, if I run this command on the unix server:
scp index.txt email@example.com:/path
It doesn't work. It hangs for a long time and eventually I get:
ssh: connec ...
If I go inside the file
/etc/ssh/ssh_config, I can see "$OpenBSD" at the top of file. However, if I change the default port to a different value, it doesn't seem to work. A colleague informed me that's because Dropbear is the software server here, not OpenSSH.
Is there a way to be sure? I can't find an answer googling that.
Mail servers cannot resolve to my SMTP mail server in google cloud. Can someone please help? Its a mailcow server
I have a Ubuntu machine, it keep going down after some(10-15) hours. It returns the error as no route to host when I try to SSH. But it works when I restart from hetzner console and again after few hours it goes down.
- syslogs: there are lots of IPs trying to connect to machine but are being blocked by firewall (UFW).
- I checked auth.log but I could not find any suspicious login.
- I chec ...
I am able to ping my virtual machine and also have a satisfying response from ssh service using telnet, but I get 'permission denied' error whenever I attempt a ssh connection from a remote host. Connection is just fine when connecting in loopback on 127.0.0.1 with the same credentials.
So I installed the apache guacamole and got the tightvnc service, which is also on the same machine as guac to connect and work perfectly.
Problem is when I try to set up a connection for a ssh into the local machine, 127.0.0.1 didn't work. Nor if I enetered the actual ip of the server.
The fields like key and key passphrase are provided correctly. And the user (not root) without and with a password ...
I made a port SSH local forwarding on a remote machine:
ssh -N -L 127.0.0.1:3388:127.0.0.1:22 localhost
it works on the remote machine itself:
telnet localhost 3388
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. SSH-2.0-OpenSSH_7.4
However, when I use this forwarding from the local machine:
telnet remote.ip 3388
Trying remote.ip... telnet: Unable to conne ...
I've set up a tunnel successfully between two servers, such that incoming connections on port 80/443 are forwarded to another server that is actually running the webserver. Further, I've used autossh to maintain the connection.
This works great, except that instead of closing fully, many of the incoming connections end up in a state of FIN_WAIT2:
..and since they are associated ...
I need to write a script so that my colleagues and myself can restart different services on multiple servers. We all connect to the servers with LDAP so i'd like my script to connect our LDAP users to the server and then use sudo to restart the services (I can write a script on each server to restart all the services needed). Right now the script simply run a command like
ssh -t user@host "sudo ser ...
I've taken a relatively simple approach to try and securely clone my GitHub repo but still struggling.
On My Mac I ran specifying name as MyKey and no password
ssh-keygen -t rsa
I uploaded the contents of the public key to GitHub with read and write access. Then I ran the following commands on my server:
cat > /root/.ssh/github.id_rsa << EOF -----BEGIN OPENSSH PRIVATE KEY----- The private k ...
I have a Western Digital ShareSpace Disk Array NAS (Same one in this manual : https://docs.rs-online.com/49a1/0900766b80ce7e97.pdf )
The system has an existing number of shares, with a lot of files and data. Each share was created through the web interface of the NAS and each has its own username and password.
I am able to login to the NAS SSH interface (as root) and when I run the command
less /etc/passw ...
I am trying to achieve the followings on my OpenBSD 6.9 servers:
- Forbidding the use of all keys but the
ssh-ed25519one on both SERVER and CLIENT sides.
ssh-keygen -Ato generate keys only by the authorised
ssh-ed25519algorithm and nothing else.
In order to achieve these, I have added the following lines to my
HostKey /etc/ssh/ssh_host_ed25519_key CASignatureAlgorithms ssh-ed2551 ...
Been coming across some issues with setting up SSH from a chroot directory out to a secondary VM. This is all being done in Google Cloud at the moment using CentOS 8. I think I have created the chroot directory correctly, added
/bin/ssh to the chroot directory, added shared libraries for
I am stuck currently at running
ssh <IP_ADDRESS>. I had to first create a
Looking for a "best-practices" kind of answer when it comes to storing private SSH keys.
Scenario: VMs are deployed to the cloud using Terraform, they use a single public key. Now the corresponding private key needs to be stored somewhere - where should it be kept? Cloud key management service (like Azure Key Vault, Hashicorp Vault)? It would be used for Ansible.
Should these private keys be added to t ...
I have a bash script
#!/bin/bash scp -r some_directory remote_host:~
which I made executable with
chmod u+x. The remote_host has been defined in my .ssh/config as follows:
Host remote_host HostName ec2-x-xxx-xx-xxx.eu-central-1.compute.amazonaws.com User ubuntu IdentityFile ~/path_to_pem_file/pem_file.pem IdentitiesOnly yes
when I call
scp -r some_directory remote_host:~ or
ssh remote_host it works w ...
From my basic understanding of
iptables I put together the below setup intended to run a Tor relay... here it is after 6 hours approx. Please note, I do not want to discuss any Tor operations, and so I shall not be pointed to https://tor.stackexchange.com/ Thank you.
There was a large attack on port 22, which I spotted when I woke up, so I've changed it, password authentication was already disabled, bu ...
I am fighting with autoSSH configuration.
- VPS as a public contact point, clients will access the VPS IP to get to the server
- My home server running the service. This machine has dualwan connectivity - so it can switch to another ISP if the first one drop. (IP address will change)
I want to make a SSH tunnel that will automatically reconnect when the connectivity is switched or one of those ...
I need to create an upload-only SFTP Server on Windows. I have installed OpenSSH SFTP Server according to https://manage.accuwebhosting.com/knowledgebase/3627/How-to-setup-SFTP-on-Windows-Server-2016.html, but I can't set the folder permissions in a way that would allow the user to list folders, but not read data.
It was very easy to do for FTPS using Filezilla Server - you can set the permissions in ...
I was using ssh connecting to a linux server and use
docker exec -u root -it container-name bash to login into the container with item2. The display failed to resize itself after I changed the font size.
And it looks like below:
- Change the setting in the server
shopt -s checkwinsize
- Change some configuration of item2 like preferences -> advanced -> Termina ...
There is 2 servers for production and DR. Both servers are RHEL 7 and same spec.
Both have same host name and different IP address. We need to connect to same outside servers over SSH without password.
When we tried to connect from DR server, it showed warning with message as below.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive). fromserver:user1$ ssh user2@dest-ser ...
This works in the command line.
ssh -i ~/.ssh/id_rsa x.x.x.x -p 22 -R <IP1>:10001:localhost:9090 -R <IP2>:10001:localhost:22
But when using the ssh config file, it fails. Below is the contents of the config file.
Host decryptor HostName x.x.x.x User sshtunnel Port 10022 IdentityFile ~/.ssh/id_rsa RemoteForward <IP1>:10001 localhost:9090 Remote ...
I am passing a very hard time connecting VM instances on google cloud. Everything was fine, suddenly the VM is refused to connect, I can't get it to be fixed.
I have run this command in cloud shell :
gcloud beta compute ssh ceunix-ubuntu-server-instance -- -vvv
and get the following message:
Welcome to Cloud Shell! Type "help" to get started. Your Cloud Platform project in this session is set to ceuni ...
Is there anyway to set SSHFS volume size with option cmd's?
I already tried to find option cmd's in https://linux.die.net/man/1/sshfs but it seems that there are no settings for that.
But some SFTP clients have quota function to set virtual volume size. How do they make it?
all of a sudden I can't login to my server from my Mac Terminal. On my Linux machine normal ssh login still works, except rsync over ssh also gets stuck.
This is what happenes when I try to connect from my Mac:
ssh -v firstname.lastname@example.org OpenSSH_7.8p1, LibreSSL 2.6.2 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug1: Connecting to xx ...
I have installed GitLab in docker on a distant machine. I would now like to forward the port 8080 from this distant machine to my local port 8080.
On the distant machine:
sudo docker run --detach --hostname gitlab.example.com --publish 443:443 --publish 8080:80 --publish 2222:22 --name gitlab --restart always --volume $GITLAB_HOME/config:/etc/gitlab --volume $GITLAB_HOME/logs:/var/log/gitlab --volume $GI ...
I check /var/log/secure and I have these logs:
Jul 9 13:02:56 localhost sshd: Invalid user admin from 22.214.171.124 port 37566 Jul 9 13:02:57 localhost sshd: Connection closed by invalid user admin 126.96.36.199 port 37566 [preauth] Jul 9 13:03:05 localhost sshd: Invalid user admin from 188.8.131.52 port 61445 Jul 9 13:03:05 localhost sshd: Connection closed by ...
Due to some circumstances we need to log OpenSSH sshd output to console, but we would also want to be able to log it to file. This would be something like running
sshd -e -E /path/to/file.log .... However, it seems as if -E is overriding, so if used, it will not log to console.
Is it possible to configure sshd to do both at the same time?