Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [ssh]

SSH (Secure SHell) is a protocol for securely running commands on a remote computer. Use this tag for questions about configuring, using and trouble-shooting SSH client and server software.

1
vote
1answer
20 views

How to copy and paste data between remote vps'vim and local vim?

Connect remote vps with ssh. ssh user@vps_ip Edit a file in remote vps with vim and write a line some text In normal mode ,press yy ,how to paste some text to my local'vim? And vice versa. 1.GUI ...
0
votes
0answers
14 views

SSH timeout on simple connection

Yesterday i made a new installation of Ubuntu 18.04. Problem I'm trying to connect to my Digital Ocean vps like always with the ssh user@ip command but it gets stuck on ssh: connect to host ...
-1
votes
0answers
21 views

SSH passwords & Special Characters [on hold]

Can anyone provide a reference that describes the use of special characters with ssh passwords during the ssh-keygen process, e.g. such characters as @ symbol? I understand at this point that using ...
-1
votes
1answer
35 views

Moving all directories into a folder, shut down my linux server

SO recently I tried moving all files in a directory into a directory within the file path I was requesting everything to move from. From the directory /srv/www/wptestsite I ran the command sudo mv ./*...
0
votes
0answers
23 views

I can't connect to a server using ssh-copy-id

I had created a new server, and I would like to connect to it using an ssh public key. I have the following config /etc/ssh/sshd_config: Port 22222 PermitRootLogin yes AuthorizedKeysFile .ssh/...
3
votes
2answers
122 views

Tmux under Kitty terminal

I recently discovered the neat kitty as some aspects of the themes I'm using under ZSH don't render quite right under Xfce Terminal but do under kitty. Unfortunately I've hit a snag when it comes to ...
0
votes
1answer
23 views

Not able to limit concurrent ssh sessions

Currently, I am running into an issue with dropbear. I have set the maximum number of concurrent ssh sessions to 10 but I still able to ssh an 11th sessions. Would you please let me know what I am ...
0
votes
1answer
21 views

How to copy keys of another linux user being root

Let's suppose we have 2 server. The server A and server B The server A and B contain the following linux users 'carlos' and 'peter' The linux user peter has its .ssh folder with id_rsa, id_rsa.pub ...
0
votes
1answer
59 views

MobaXTerm X11 forwarding issue with UNIX

Ran below commands on MobaXTerm: Using MobaXTerm terminal on windows laptop: > xhost +ulv78.abc.com ulv78.abc.com being added to access control list > ssh -l someuser ulv78.abc.com # RHEL 7.x ...
0
votes
0answers
37 views

Linux server is not accept ssh private key to login without password?

I'm trying to connect to a server (as user) with a RSA key. I have uploaded the key using ssh-copy-id and it is properly located in ~/.ssh/ folder. Typically this would be enough to connect to the ...
1
vote
1answer
63 views

SSH login without password and without keys [duplicate]

Is it possible to configure a user to login via SSH without password and without using keys. Just typing "ssh user@server". I have tried some modifications with Match User and with AllowUsers in /...
0
votes
1answer
32 views

SSH configuration: chown username:group: says invalid user

My Ubuntu16.04.4 server has username: graycodes THE ERROR OUTPUT: chown: invalid user: 'vagrant:vagrant' I'm setting file permissions for OpenSSH. What I'd like is to keep my username as ...
1
vote
2answers
46 views

Why does ssh look for keys in /root/.ssh when run with sudo?

When I try to sudo ssh ... I get permission denied because ssh looks in /root/.ssh for the keys, not in /home/me/.ssh. But $HOME is still set to /home/me. Why doesn't ssh look in $HOME/.ssh?
0
votes
1answer
49 views

How to solve problem with ssh authentication?

I am trying to login into remote server without password using ssh but I am get the error: Permission denied (publickey) To copy .pub key to the server, I had: PasswordAuthentication = yes (in the ...
0
votes
0answers
13 views

firewalld custom drop message [on hold]

Problem is the I have 2 machines I want a custom message for one system accessing the other system via ssh. if one of the systems is configured with firewall and drop all the incoming packets. The ssh ...
0
votes
1answer
30 views

SSH tunneling to download data on local machine [on hold]

I work behind a proxy network, which has data limit. Now I need to download large size of data, which I will do using a remote server, where no restriction applies but have very few space. I am ...
2
votes
3answers
97 views

How can I disable all possible remote access?

My ex set up my computer and is a little possessive still. I want to make sure they can't monitor my computer usage, access files, etc. I wonder if there is a blanket setting in system preferences or ...
0
votes
1answer
30 views

Locking account password and instead use RSA key

Setting up a CentOS 7 cloud server for a client, and have run into an issue with setting it to use a public RSA key instead of a password for one of a handful of SFTP users. Found an online guide on ...
0
votes
1answer
25 views

Write script to generate report on every Thursday [closed]

On every Thursday we have to send the report like below for 18 servers Account: swebwpsp Server name: nykpsr17896 Disk space usage: 70 % (we use df -kh command) Date: 20-09-2018 Similarly we have 18 ...
1
vote
2answers
59 views

ssh from linux to windows does nothing

I installed KpyM on my Windows 10 machine and started it. It says the service is running. Proto Lokale Adresse Remoteadresse Status TCP 0.0.0.0:22 DESKTOP-4VRVV1O:...
1
vote
2answers
56 views

Can you nest remote calls using ssh in a bash script? [duplicate]

I have run into a strange issue that Computer A can see Computer B, Computer B can see Computer C, but Computer A can not see Computer C. I would like to make a bash script that can be run on A that ...
1
vote
0answers
34 views

Setup SSH tunneling to run some commands from the remote server

I'm struggling in setting up a SSH tunneling and need some help in doing it. Here's what I currently have done: I have an EC2 instance (Private Instance) in a private subnet with no NAT gateway or ...
0
votes
1answer
32 views

SSH through a gateway that needs a proxy to access final destination

I have to set up an ssh/sftp connection which needs a certain configuration, and I've been looking around but didn't find an answer. I'm not sure it's even possible without some work around. I have 4 ...
0
votes
1answer
48 views

Why would one have to exit twice when leaving an ssh bash connection? [closed]

When connected through SSH, a machine requires that I exit twice before returning to the local computer's shell; is there a reason why this happens, it doesn't seem like it should work that way.
-2
votes
0answers
44 views

piping commands to ssh [closed]

I am using the below commands to login automatically to the router and execute "show run" command and then exit, this is invoked by cron every five min this is working fine (echo "uid"; sleep 1; ...
0
votes
0answers
36 views

No users can ssh using keys into recently upgraded CentOS 7 machines

We have two servers that we just upgraded to CentOS 7 and ever since then, none of our keys work to ssh into them for any of our users, it always goes to passwords. This doesn't happen with our other ...
0
votes
1answer
48 views

sshpass in .ssh/config?

When running the command: ssh minix.p what I really want run is: sshpass -f ~/.ssh/minix-password ssh minix.p Is there any way I can do that? Background I want to use sshfs and similar tools, so ...
0
votes
0answers
50 views

Why would ssh connections alternate between success and failure every ~30 seconds? [closed]

I move hundreds of files from one server to a remote server, 24/7. Same script, same servers, etc. The script monitors a directory, and when a file appears, transfers it to this remote server. The ...
0
votes
1answer
14 views

VPN to a subnet B via an ssh connection via connection A on the same server

I have a server at a remote location, which is on two subnets (i.e. it has two network interface cards NIC1 and NIC2, A is on e.g. 130.0.0.0, B is on 192.168.1.10). I can ssh in via A, which is ...
1
vote
1answer
29 views

Where does SCP keep its Known_Hosts info

I am looking for the file in which scp keeps known_hosts information. Can anyone direct me where this would be on Linux? I have looked in my $HOME/.ssh directory but the information is not kept there....
1
vote
1answer
26 views

ssh asking for password when trying to login via public key

Although these lines are present in my server's /etc/ssh/ssd_config RSAAuthentication yes PubkeyAuthentication yes when trying to login to the above server by explicitly providing a private key to ...
0
votes
2answers
20 views

Configuring .ssh/config to forward host aliases to a remote host?

We use jump hosts to access our hardware. These hosts are short-lived (less than a day), and are different every time they're generated. I would like to be able to configure my local .ssh/config file ...
0
votes
0answers
49 views

SSH KEY login issue

I am having issues sshing into a using using pub key authentication. Here's a snippet of the debug: debug1: Found key in /root/.ssh/known_hosts:11 debug2: bits set: 3108/6144 debug3: send packet: ...
0
votes
0answers
29 views

Interrupt signal names don't work over ssh: bad trap [duplicate]

If run over ssh, a script with a trap statement with interrupt signal names (SIGINT, etc) gives an error and the trap does not work when an interrupt (eg. Ctrl+C) is sent. Eg: #!/bin/bash trap '...
0
votes
1answer
35 views

How do i execute any command inline ssh as if I'm typing it manually but direct output to local machine?

I have access to a remote server that I don't fully control and prefer to have my automated scripts that do things on that server live locally. I've found that not all commands executed inline with ...
1
vote
2answers
41 views

Activate remote display and run X application remotely

I have a desktop machine running Debian 8.0 that I have ssh access to. I run a graphical application on this machine remotely, so I would just leave my desktop session open, ssh into the machine, and ...
1
vote
0answers
30 views

How can a script run by a user logged-in over ssh, get the user's public key? [duplicate]

I need to get the users public key, that was used to authenticate the current ssh session. Running env only shows: SSH_CLIENT=192.168.1.2 35538 22 SSH_TTY=/dev/pts/0 SSH_CONNECTION=192.168.1.2 35538 ...
1
vote
1answer
27 views

Some commands not working when executed via ssh while redirecting output locally

I can run the following two commands for example and get the output locally: ssh user@remote.ip ls > testhistory.txt ssh user@remote.ip "cat .bash_history" > testhistory.txt But if I run ...
0
votes
0answers
33 views

how can I automate the process of login to my remote host via jump host

I am using a Windows machine and I connect to my remote host via a jump host using a SSH software (I use mobaxterm for now). Now my login process is like this: Load the jump host session I have saved ...
0
votes
3answers
54 views

Reboot over ssh

I'm trying to reboot a Teltonika RTU950 using ssh. I can log in as root via ssh and then reboot the router fine. However if i try to send the reboot command over ssh it does not work. ssh root@...
-1
votes
2answers
37 views

Create another SSH key for the same user

At the moment, there is a user with username "userA" with it's own RSA SSH key, let's call it "KeyA1". How do I add another RSA SSH key to that same user "userA", "KeyA2"? So that "userA" can SSH to ...
0
votes
0answers
23 views

Need to resolve path with spaces in it

Currently I'm using a command that supplies me a path which is containing spaces in it. Now while using this path in svn export command I'm facing issues as the command is having trouble ...
0
votes
1answer
41 views

ssh - Connection reset by [ip] port 22 (Ubuntu 16.04)

I have been ssh'ing to this computer (also Ubuntu 16) for months, today it's not working. running ssh -v [ip] yields OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016 debug1: Reading ...
2
votes
2answers
36 views

Disable ssh password authentication programmaticaly

I am provisioning a machine using packer. The tool offers shell provisioning functionality so I am able to run whatever shell commands I want. I would like to disable ssh password login. Is there a ...
0
votes
2answers
39 views

sshfs with on-demand mounting

I followed instructions for sshfs "on demand" mounting, but it doesn't work. I added this to /etc/fstab: username@hostname:/ /mnt/remotes/hostname fuse.sshfs noauto,x-systemd.automount,_netdev,users,...
3
votes
2answers
39 views

zsh script that takes a variable number of arguments

I have just (belatedly) discovered that I can ssh -t from one machine to another and run a command there. The thought then took me that I should be able to come up with a script that tailed a log ...
0
votes
0answers
20 views

Custom SSH Connection Options with Midnight Commander

I usually connect with… mc sh://remoter_user@192.168.0.5/Users/remote_user/Downloads/ This command allows me to open mc with the left pane on my current local folder and the right one on the remote ...
1
vote
1answer
37 views

Is it possible to have conditional options in ~/.ssh/config based on the calling application (ssh or sshfs)?

In my ~/.ssh/config file I have the following option: RemoteCommand /bin/sh -c 'tmux has-session && exec tmux attach || exec tmux' This automatically starts tmux and connects to an existing ...
1
vote
2answers
37 views

How to list all the processes assigned to a user on a cluster

We have a cluster in our university controlled by SLURM. The issue is that I have observed sometimes some of the resources are not being realised even though they do not show up in the squeue command. ...
6
votes
2answers
945 views

Why not ssh.service but sshd.service?

When you have modified /etc/ssh/sshd_config, you may execute systemctl restart sshd.service to reflect the change. At least in my environment, also, systemctl restart ssh.service works. And systemctl -...