New answers tagged

0

Synergy is a commercialized open source product which enables this, and there's a Linux GUI for it. Barrier is an free fork of Synergy.


1

If you're asking if the service will stop running by itself once the last connection has been closed, the answer is no, it won't. But that doesn't necessarily mean you should stop the service; in most uses cases, you would keep it running. It's not generally necessary to stop sshd (the OpenSSH service) when there are no connections, and people don't usually ...


0

Possible causes that I can think of A different sshd binary is started on boot or sshd is started with a different config. Maybe systemd is the culprit here - it has a different way to change port, via file /usr/lib/systemd/system/sshd.socket apparently: https://www.vultr.com/docs/how-to-change-ssh-port-on-coreos The correct /etc/ or /etc/ssh isn't mounted ...


0

You might be interested in trying a Dynamic DNS solution. This is where your system updates a DNS entry every time it starts up, or whenever the WAN IP has changed. This has the benefit of allowing you to use a DNS record instead of a [changing] IP address that can easily be added to your ~/.ssh/config. Please understand that DNS entries have TTL values ...


0

Only root can use well known ports, or those between 0 and 1023. I am assuming (and you should not be) sshing into the machine as root. Try a much higher port, such as 8080. /etc/ssh/sshd_config needs to allow for Port Forwarding, as well.


1

For AWS, download the pem key, and run: ssh-add /path/to/pemfile.pem That worked for me, ubuntu 18.04. Source, Nothing else was needed. NB: However, it is important to set the permissions to 400 before doing this. chmod 400 /path/to/pemfile.pem If not you will get an error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: ...


0

Note- this will only work if both side network interface card and the network components have same config. You have to edit config file- vim /etc/network/interfaces Add mtu follows for interface Add mtu 9000 ctrl+c wq! and restart network service systemctl restart NetworkManager


0

KDE seems not to start ssh-agent automatically. Install ksshaskpass and nano ~/.config/autostart-scripts/ssh-add.sh Enter the following: #!/bin/sh export SSH_ASKPASS=/usr/bin/ksshaskpass /usr/bin/ssh-add $HOME/.ssh/id_rsa </dev/null Check if the path is correct with whereis kaskpass If you have multiple keys just separate them with a space. Make the ...


0

Other than strictly disable host key checking, you can also connect by typing: ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no <username@target_machine_ip_or_domain_name>


0

I experienced this too. Resizing the window to make things work is a real thing :-/ And this fixed things: https://github.com/Microsoft/WSL/issues/2138#issuecomment-393617253 To summarize the solution: Open a new WSL (Ubuntu) window and run this script while killall -CHLD ssh; do sleep 0.1; done


0

I directly connected the Raspberry Pi to my computer through ethernet, and connected a monitor to the Pi. Then I ran ifconfig in the Pi to get its IP address (it was 10.42.0.38, maybe this is the default?) Then I sshed to the RPi from my desktop, and now it is connected to the internet. However, this does not solve the issue when RPi is connected to a ...


0

On the Raspberry Pi, enter this command: sudo ip route add default via xxx.xxx.xxx.xxx where xxx.xxx.xxx.xxx is your desktop computer's IP address. Your RPi already knows where your local network is. This command tells the RPi that there is a route to all other IP addresses (a default route) and it goes through your Ubuntu machine. You may need to set ...


2

I know this is a long time ago but it's still appearing in search engines so I thought I'd answer. Assuming a simple setup of one pc that you are sitting at called "parent", this is the one with the keyboard and mouse. The "child" is the one you want to connect to and it has no keyboard and mouse. [user@parent ~]$ cat /home/user/synergy-over-ssh.conf ...


1

As tritium_3 suggested, I had to edit .ssh/authorized_keys, to remove the following text: no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10" and keep the ssh-rsa and key that comes after it. However, the rsync command had copied the file to the new user,...


2

OpenSSH always uses the shell of the user it is logging in. The simplest way is to change your remote user shell to zsh: usermod --shell /usr/bin/zsh YOUR_USERNAME Other possibility is to use ForceCommand in sshd_config, which will run the zsh for you under the default shell (bash). But note, that this will actually prevent you from running any other ...


0

When setting up a virtual network device you need to set the cable connected checkbox, otherwise the network device will be present but has no link.


1

First, you need to enable ForwardX11 on the client and X11Forwarding on the remote host in /etc/ssh/sshd_config. Then, try without adjusting DISPLAY on your workstation/remote machine first. Only set the DISPLAY variable after you've ensured everything else is set up to work correctly. You shouldn't have to set this but it is possible. I believe that the ...


2

Try running ssh server on different ports, maybe that will help. Say Linux on port 22 and Windows on port 222. Another idea is to copy the same ssh fingerprint/ public key across Linux and Windows.


1

You cannot force a client to enable X11Forwarding by putting an entry in any sshd_config file, but instead need to enable ForwardX11 on the client machine, and for ssh not sshd. X11Forwarding needs to be enabled on the server, but that doesn't mean it's enforced. You can do this by editing your ~/.ssh/config for the user, and adding a Host entry for your ...


1

there is a command inside authorized_keys as follows. cat /root/.ssh/authorized_keys no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10" remove this line and keep the ssh-rsa and key that comes after it. save the file then try again.


0

The answer is as simple as connection with -X flag: ssh -X me@myserver This should set proper display variables for you. You can see what the value is like this: echo $DISPLAY When I ssh into my host, I get this value for DISPLAY: localhost:10.0 You may have more in your server's config file than you need. All I have in mine is the following: SendEnv ...


0

In my case, it was because one of the scripts in /etc/update-motd.d failed to run (giving a non-zero exit code). Fixing it made MOTD start appearing again. If you're unsure which one it is, just append a line exit 0 to all scripts in that directory. I noticed this on my machines running Ubuntu Disco and Debian Buster, but I am confident that it's ...


2

ps -Af | grep sshd: | grep @pts will show all the ssh processes for users that are logged in or making an attempt to log in. How it works: ps -Af list all the running processes grep sshd: filters all but those lines with 'sshd:' which is the child process of the ssh daemon. Each connection gets its own child process. grep @pts filters all but those lines ...


0

using option -t (terminal) in ssh command solves the problem too (better than redirecting stdout if command output is something usefull that we want to see): ssh -t remoteip command


0

Clone using https and it will always ask for password. Eg - git clone https://github.com/my_company/myrepo.git


0

From man ssh: -L local_socket:remote_socket 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. DNS commonly uses UDP, not TCP. Whilst TCP can be used, and dnsmasq has limited support for this, it's not given ...


0

So what I did was go to Security and Preferences and turn off the firewall. It should work. After the connection is made, you can turn the firewall back on.


0

Make sure the machine your trying to ssh from is in the same subnet. Try changing the adapter type in the VM settings to Bridged or Host-only.


0

Because the server already knows your public key and you didn't set a password for the key. So it just lets you login. If one was to try this after setting it up as such from a machine that didn't have their keys uploaded it wouldn't let them connect.


0

You can use -P option or -oPort option to SFTP to a server from a specific port. sftp -oPort=port_no username@x.x.x.x eg. sftp -oPort=8022 rahul@x.x.x.x or sftp -P port_no username@x.x.x.x eg. sftp -oPort=8022 rahul@x.x.x.x Note that -P is capital P not small


1

If you are copying inside a VM, in some VM's Windows doesn't know that. If you are using Virtualbox, you can't copy something inside the VM and then paste it on Windows. But some VM's can do that like Vmware workstation. I used both virtualbox and vmware workstation and i've come across with that problem at the time. While virtualbox doesn't allow you to ...


0

You have to set the port forward in the Oracle VM Manager. Select the VM, then the gear (settings), in network you should find the forwarding button. You have to do this because VBox by default creates a virtual internal network and NATs the traffic through. These settings tell VBox which ports to forward from your local network. Example for ssh and docker ...


0

There is a slight variant of a way described in the blog on how to use sshpass which can be found here. Given that you have a gpg encrypted password (how ot do this is described in the blog) file you could do something like this: sshpass -p $(echo $(gpg -d -q .sshpasswd.gpg)) ssh your_desination.xyz and simply save that command as an alias in your ....


0

I ended up using SFTP in CX File Explorer instead... It's a bit slow, but this is not a problem since I'm doing most downloading when on the local network (via normal FTP connection).


2

By default the open-sshserver comes with enabled SFTP feature, so you can use it as it is described here: Filezilla or WinSCP alternative for Ubuntu. For single file or directory (also with recursion) either scp or rsync are appropriate. For better performance I would use rsync in a way as this: rsync -av user@host:/remote/path/to/<file or directory> ...


1

A combination of @Simon Sudler's answer and this other one: 1. Your home directory ~, your ~/.ssh directory and the ~/.ssh/authorized_keys file on the remote machine must be writable only by you: rwx------ and rwxr-xr-x are fine, but rwxrwx--- is no good¹, even if you are the only user in your group (if you prefer numeric modes: 700 or 755, not 775). 2. If ...


0

Check the ssh service status: service open-ssh status If you don't have it, just install openssh-server sudo apt install openssh-server And restart the Virtual Machine (VM) sudo reboot And just connect again. Source for above answer


0

You can also add these arguments in the ssh command, like so... ssh -o ServerAliveInterval=180 -o ServerAliveCountMax=2 $HOST


0

Thanks to @FedonKadifeli: Remove the authorized_keys copy the file from aaa to bbb chown the bbb/.ssh Everything is working now!


0

wrote a script support this url scheme: ssh://[user[:pass]@]host[:port] xdg-open-ssh: use gnome-terminal or terminator open the ssh url, if pass occur, use sshpass input password. if pass err, failback to user input password. https://github.com/yurenchen000/xdg-open-ssh


0

Allow ssh to ufw will solve the problem. Run the below command to allow. sudo ufw allow ssh


0

I had the same issue but after restarting the sshd daemon I could connect to host. sudo systemctl restart sshd && systemctl status sshd This is only a temporary workaround until you increase the MaxAuthTries parameter.


0

I found a workaround/hack ssh -t IP_ADDRESS bash -t to force tty allocation send the bash command, as sending a command doesn't output any of the bannery business. have fun


0

I think this question has been asnwered in another post, please read this post first and if you do not get answer or if you have specific question feel free to modify your question. https://unix.stackexchange.com/questions/92664/how-to-deploy-programs-on-multiple-machines I am pasting the answer for your benefit. Thanks Terdon For this answer. you can ...


2

Use the netstat command to observe what is listening on each port: doug@DOUG-64:~$ sudo netstat -tlnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1097/smbd tcp 0 0 127.0.0....


-1

[root@server ~]# ls -la /etc/ssh/ssh_host_* -rw-------. 1 root root 668 Jun 25 00:03 /etc/ssh/ssh_host_dsa_key -rw-r--r--. 1 root root 609 Jun 25 00:03 /etc/ssh/ssh_host_dsa_key.pub -rw-r-----. 1 root ssh_keys 227 Dec 14 2018 /etc/ssh/ssh_host_ecdsa_key -rw-r--r--. 1 root root 162 Dec 14 2018 /etc/ssh/ssh_host_ecdsa_key.pub -rw-r-----. 1 ...


Top 50 recent answers are included