Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

In my opinion, SSH tunnels are not suitable for this purpose. Of course, it works, but you have to run as many tunnels as ports you want to forward. VPN is probably the best option to achieve that. You configure the VPN server on the VPS, you connect your home server(s) as VPN client(s), and when you are not home, you connect your laptop or remote computer ...


0

Request a static IPv6 prefix from your ISP. Get IPv6 for all your Internet access. Configure IPv6 tunnelbroker, VPN, or other transition methods for when you only have legacy IPv4 access.


0

In your local desktop or source desk nano ~/.ssh/config edit this via and add below code inside that file. Host *           IdentitiesOnly=yes Than save file, ctrl+o exit file, ctrl + x That's will resolve issues of connection.


0

This may not be related, but selinux related slowness has been report for IPA-based accounts here: https://access.redhat.com/discussions/3499951 The solution for that case is: I looked into SSSD and IPA user forums and since my systems do not use SELINUX, I went ahead and added this to the domain section in the sssd configuration: selinux_provider=...


0

Configuration: CentOS Linux release 7.6.1810 (Core) /etc/ssh/sshd_config contains: X11Forwarding yes The following commnand works for me: ssh -Y HOST bash -l -c gnome-terminal --display=${DISPLAY} < /dev/null > /dev/null 2>&1 & The gnome-terminal --disable-factory informed me --disable-factory was no longer supported.


0

The most important part of "securely" adding a key to the known_hosts file is to get the key finger print from the server administrator. The key finger print should look something like this. 2048 SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 github.com (RSA) In the case of GitHub normally we can't talk directly to an administrator, however they put ...


0

I had the same issue with one of my GCP VM instance. My solution was: Shut down the instance Click 'Edit' for the instance Under 'Custom Metadata' section, add 'startup-script' key, with value: #! /bin/bash sudo ufw allow 22 Click 'Save' Start the instance again, and SSH into it Hope it helps!


1

The traffic flow you describe, from internal system-A to WAN IP-address of NAT-router-A where port-forwarding happens, is called hair-pin NAT. (See for instance this Q&A for a more lengthy description of the traffic flows and perils.) Depending on how hairpin NAT has been implemented in your NAT router, you may see that the source address of the SSH ...


0

Turns out this has nothing to do with the renaming thing. The problem comes from the pam_ldap configuration. I added debug at the end of one line in /etc/pam.d/sftpd file, as in : #%PAM-1.0 auth required pam_ldap.so auth required pam_sepermit.so auth include postlogin ## Used with polkit to reauthorize users in remote ...


0

Actually SSH should have the default system environment variables. This means that its variables should be from the following files: /etc/environment, /etc/profile, /etc/profile.d/, /etc/bash.bashrc. A lot of the variables are shell specific though; Since you're using bash you'll automatically execute /etc/bash.bashrc and the user-specific login scripts ...


0

I have the same problem and found out that these steps work: Stop your instance Go to `Instance Settings -> View/Change user Data Paste this Content-Type: multipart/mixed; boundary="//" MIME-Version: 1.0 --// Content-Type: text/cloud-config; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="...


0

So I found the answer... apparently it was a typo. I found another post telling me to look in /var/log/secure and there were errors there about not being able to find the endpoint. My problem is I was using the endpoint of an old replica read node that I used initially to see the data in my master, that has since been deleted. I didn't realize it because ...


0

check /etc/ssh/sshd_config You probably have tunneling disabled: AllowTcpForwarding no needs to be AllowTcpForwarding yes


1

You can give a specific value by using SetEnv in your ~/.ssh/config, e.g. Host * SetEnv FOO=bar Assuming your server got the following line in /etc/ssh/sshd_config: AcceptEnv LANG LC_* BAR Check also: man ssh_config and man sshd_config.


0

I'm assuming you are trying to maintain an SSH tunnel. There are many ways to do it, I don't know if there is a "right" one though, as it depends heavily on what are you actually trying to achieve. One approach (one of the easier ones) is to start the SSH session in a screen, give it a unique name, and use screen's commands to terminate it. Here is a sample ...


0

I'd recommended opening man rsync -e, --rsh=COMMAND This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Simply put, using rsync --rsh="ssh ${SSH_OPTS[@]}" will allow passing options to ssh as invoked by rsync.


1

I had the same question and edited ~/.gnupg/sshcontrol to reorder the entries. # List of allowed ssh keys. Only keys present in this file are used # in the SSH protocol. The ssh-add tool may add new entries to this # file to enable them; you may also add them manually. Comment # lines, like this one, as well as empty lines are ignored. Lines do # have a ...


0

It is possible that rsync might be writing faster to the disk cache than the disk on the server is able to keep up with, see for example https://unix.stackexchange.com/a/331189/163108 for a more detailed explanation, and https://unix.stackexchange.com/a/523896/163108 for a similar problem but different case when using rsync over a samba/cifs mounted drive. ...


0

I've done few configurations on my Ubuntu 18 Vagrant box in order to successfully connect MongoDB remotely using Robo 3T GUI. I've explained in the following steps. On Ubuntu server, to open mongo shell run: $ mongo Inside mongo shell, type following command to create new a admin user. > use admin; > db.createUser({user:"admin", pwd:"password", ...


1

I don't know what exactly happens in your case, but I'll try to describe steps to troubleshoot this issue. Check the logs of the ssh daemon. Increase the level of logging. Maybe it'll help to find the cause. Don't use the ifconfig. It's deprecated. Otherwise extend the question and provide the complete command, that you run. Use the gnu screen or the tmux. ...


0

You must change the route towards your destination. A previous answer stated that the -b or -B options can be used, but normally, if the VPN is activated this does not work because it reroutes the traffic towards any destination through the VPN network interface - generally named tun0. Therefore, you must reconfigure the route taken to reach your ...


2

That sounds like a MTU issue - perhaps the extra IPv6 addresses in the ifconfig output tipped the packet size over the MTU limit and the session hangs. Does the hangup happen with any other long-listings? Perhaps when running top? Or when copying files to/from the host? Check the link, it explains what a MTU problem is and what you can do about it.


0

thanks for the help I managed to crack the issue I have IPtables configured to accept INPUT on the eth0 mgmt-vrf interface as per: sudo iptables -L -v 136M ACCEPT all -- eth0 any anywhere anywhere this does reference the slave device, but on here: https://www.kernel.org/doc/Documentation/networking/vrf.txt I found that you also ...


2

Another solution would be to clear the screen at the beginning of the motd file like so: ^[[H^[[2J whatever was originally in the motd file here Note: replace ^[ with the escape symbol (which you can create in the nano editor by pressing the following keys: esc+v+esc)


5

It's right there, in the man page: -L Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. -R Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the local side. (...


-1

Established means that the user on the other end has an open connection and so things like "shutdown -I" should work except if obviously you cannot do that anyway. I only worry about the outputs labelled Established unless the other ones are needed.


2

You're not providing much information... It could be compromised, it could be another machine behind the same gateway that is trying to login into your system spoofing the real gateway's IP, it could be the gateway that is natting connections from outside to inside and the attacker is not hiding at all, and it could be an attacker that is spoofing gateway's ...


0

Ar my scenarion it was wron permissions for private keys: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0444 for '/etc/ssh/ssh_host_rsa_key' are too open. It is required that your private key files are NOT ...


1

To add to "answered Jan 7 '12 at 0:11 mklein9 28129" "The ssh sessions started after I changed the Mac client's /etc/ssh_config to include the line: ForwardX11Timeout 596h ... but the timeout will still happen 3-1/2 weeks from now." Apparently you can use 0 and this sets timeout to infinity (as long as the connection is on). ForwardX11Timeout 0 ...


1

What kind of SSH authentication are you using? It seems that your SSH server only accepts SSH keys. This is fine, if rke has a valid key which need to be specificed in the configuration (either global or on a per node basis): nodes: - address: 172.16.20.22 user: rke ssh_key_path: "/home/rke/.ssh/id_rsa" role: - controlplane ...


0

if possible/for testing/debug: use IPs instead of hostnames (just to make sure) are there multiple machines having the same IP (DHCP gave IP that was used by another host with fixed IP) on the net? if machines are using DHCP, their IPs can change at random times (order of bootup etc) maybe you are now trying to connect to a different host - enable password ...


0

Following off of what others said, the set manual is a good resource. I put: #!/usr/bin/env bash exec 1> command.log 2>&1 set -x At the top of scripts I wish to keep going, or set -ex if it should exit upon error.


0

Configure your regular SSH server to listen on a non standard port. Then you can configure gitolite to use the now free port 22. This makes it easy for your users, and you seem capable enough to use ssh on a different port.


0

It looks like it's using ipv4 for one part, and ipv6 for another. When I use -4, I properly get: bind: Address already in use channel_setup_fwd_listener_tcpip: cannot listen to port: 8080 ...


0

Stop dropbear in any service managers or init scripts that are starting it. Then you have no sshd listening. Naturally, you will need some other protocol to manage the device.


3

I am trying to create a new config file in ~/.ssh/ and setup some rules that would over ride the default system rules and restrict only logins for one user on the system. As far as I know in a ~/.ssh/config you're setting up options and restrictions for the ssh client, which, while oftentimes very useful, are not restrictions enforced by the server. That ~/...


0

You can specify the allowed ssh client ip address within the AllowUsers option in form username@ip. This form also supports the wildcards in the address part (after @ symbol).


0

The documentation for this is at https://guacamole.apache.org/doc/1.0.0/gug/configuring-guacamole.html, under the Text session recording (typescripts) header. This is enabled whenever a path is set in your connections settings. Login the the web interface, go to Settings > Connections > YourSSHServer and set the path in the Typescript (Text Session ...


2

You can redirect process output to file with gdb https://blog-en.openalfa.com/how-to-detach-from-the-terminal-a-running-process-in-linux and then disown it Upd: I had to run gdb with sudo and slightly different gdb command in Ubuntu 18.04: p (int)dup2(open("/tmp/test.stdout", 1), 1)


3

Create a yum repo out of that package directory. Share it with http or ftp. On the hosts, install this yum repo, perhaps call it local. Install and update only these packages: yum --disablerepo='*' --enablerepo=local update '*' For doing it on many hosts, use automation software. Ansible is very good at just ssh into a box and doing things, in parallel, ...


2

This is the source port of the connection on the remote end. The connection is made to port 22 on your side (or whatever your SSH daemon is listening on). Every network socket consists of a source address and port and a destination address and port. The source port is randomly selected by the originating OS.


0

My guess is that your ssh key is not added in your github account or Jenkins slave process runs with a different user than the one you used to run git from command line. If that is the case - you'll need to add ssh key to your github accouunt or need to approve the initial host key verification for that user before you can run git in Jenkins. (you know - ...


2

The man page states, in relevant part: The criteria for the host keyword are matched against the target hostname, after any substitution by the Hostname or CanonicalizeHostname options. The originalhost keyword matches against the hostname as it was specified on the command-line. Therefore you should Match user jhonfoo originalhost myhost instead.


0

In windows if I use the ssh-keygen of cygwin to generate the keys, then x2goclient keep asking me for a passpharse..!! solution: I followed the oficial manual and I can now connect to ssh using keys. the problem was that we have to use the ssh-keygen that come with x2go in windows and not other (at less in windows). Windows client Start a command ...


0

To use screen with ssh, type ssh -t <user>@<server> screen -r (source). man ssh: -t Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.


0

There's now a chef authorised keys cookbook. You simply add your key to your cookbook thus: ssh_authorize_key 'bob@acme.com' do key 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCctNyRouVDhzjiP[...]' user 'root' end Note that if you use this cookbook, any keys added by hand will be deleted.


0

While still running in GCE, confirm the ssh key you want is in ~/.ssh/authorized_keys. When python Linux guest environment for GCE is installed, this probably already exists if you ever logged in with gcloud. (I don't think the users are removed when the metadata service isn't there. But if so, create different named users.) Give the guest known names and ...


1

OpenSSH privilege separation is implemented with a privileged and unprivileged process per connection. Per user slicing is a feature of systemd-logind.service driven by pam_systemd. Unclear to me as to why you have a bunch still in systemd.slice. Perhaps those use the PAM stack differently. A single user slice for 5500 SSH connections? More than typical ...


0

Syntax: s3fs# fuse _netdev,allow_other,passwd_file=/home/ubuntu/.passwd-s3fs,use_cache=/tmp,umask=002,uid=1000 0 0 Example: s3fs#examples /home/ubuntu/s3bucket/examples fuse _netdev,allow_other,passwd_file=/home/ubuntu/.passwd-s3fs,use_cache=/tmp,umask=002,uid=1000 0 0


0

Resolved. Via this: ssh jenkins@srv1 "mkdir D:\myfolder\\$test" So, we have to add \ before our variable


Top 50 recent answers are included