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.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

hooking to stop docker run or other processes when the ssh connection drops/terminated

So we have a server that many users use and they use a variety of docker containers. The issue is that when a connection unexpectedly terminates unlike other processes docker run continues to operate. ...
0
votes
1answer
12 views

execute script on remote machine from jump host without password prompt

I have a script fixa.sh deployed in all my client machine. I want to run this script from my jump host through a for loop script. Script on execution, prompts for sudo password. How can i make it as ...
0
votes
0answers
10 views

LDAP disable local account, and pub/private key on centos

I am currently setting LDAP/krb5 on Centos7. I followed the instruction on: https://wiki.cac.washington.edu/display/LDI/Configuring+Linux+Clients+for+LDI (thanks to Eric) http://staff.washington.edu/...
0
votes
2answers
42 views

How to save an image of an active window when X server is not running

I have a computer in remote location that I prefer to use as a server. I always keep the lid closed, and it is set to always keep running while the screen is off. Because I use this server to run ...
0
votes
1answer
34 views

How can I get the SSH host key 'known_hosts' value from localhost?

Instead of doing ssh-keyscan -H externalIpExample, how can I generate that value directly from the localhost machine (without network access?) I have two public keys (on one particular host) in /etc/...
0
votes
2answers
52 views

Login to remote Linux box and execute commands

To delete all but 2 of the latest files in a dir running on a remote Linux box I use : cd /data ls -1tr | head -n -2 | xargs -d '\n' rm -f -- I execute these commands manually after logging into ...
0
votes
1answer
26 views

SSH ProxyJump with key on jump host

I'm trying to connect to a server through a jump host. I usually do this by first logging in to the jump host and using a key which is deposited there to log in to the server. Agent forwarding is ...
2
votes
1answer
27 views

Can't use sshfs anymore, but I can use ssh

I am having trouble mounting a Raspberry Pi4 on my Linux PC. Raspberry OS: Linux MyDesiredName 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux / Rasbian Buster Lite PC OS: Linux ...
0
votes
0answers
13 views

How to diagnose slow session for VPN Putty SSH to a server

I'm connecting to a Linux server with my windows machine. I need to VPN first. Then launch Xming. Finally, I use Putty SSH to make the connection. The problem now is it's extreme slow to run the ...
-3
votes
1answer
39 views

How do I run Multiple commands for every x seconds

I need help in creating a script that i can run by ssh into below firewall ip for every ten seconds from a linux machine. I have to save all the commands output to a file that is readable Firewall ...
0
votes
2answers
32 views

Difference between sshd-keygen and ssh-keygen

I understand that ssh-keygen is used to generate private and public keys. But what is the use of sshd-keygen? I don't find a man page or doc, hence there is no documentation about the use of sshd-...
-1
votes
2answers
49 views

What is the default password for a Linux Mint live usb

Im sure some else has had this problem before, but I can't seem to find a proper answer. What is the default password for a linux mint live usb? Most of the other answers say that my install would be ...
0
votes
1answer
23 views

Can't Start Fail2Ban

Lately I got 3 emails from Fail2Ban The jail nginx-http-auth has been stopped. The jail nginx-badbots has been stopped. The jail ssh has been stopped. Then I start SSH into my VM, this is the log ...
0
votes
1answer
27 views

Correct umask value to automate the creation of file with the SSH private key content

I'm trying to find a way to shorten these lines (CI_PRIVATE_SSH_KEY is already set): mkdir -p "${HOME}/.ssh/" chmod 700 "${HOME}/.ssh/" echo "${CI_PRIVATE_SSH_KEY}" > "${HOME}/.ssh/id_rsa" chmod ...
0
votes
0answers
9 views

Intermittant connection issues to Raspberry Pi over ethernet switch

I have a Raspberry Pi connected to my Ubuntu laptop with a 5-port tp-link ethernet switch. I was having trouble ssh-ing to it until I learned that I need to have dhcpcd running on the host computer, ...
0
votes
0answers
32 views

How does the SSH-CA Authentication works in detail?

I know how to Setup the whole SSH-CA Stuff, with Configuration of sshd and signing of the Keys. But what i wondering is, how does the Authentication works in detail? Like it is described here in the ...
0
votes
0answers
31 views

rsync over ssh backup failing sometimes with code 20

I have backup script running by crontab on a remote server. It pulls data from a local server through ssh. Here's the script rsync line: rsync --delete --stats -h -av -e ssh root@$1:$2 $3 > $syncdata ...
0
votes
2answers
25 views

Ansible user ssh sudo PermitRootLogin disabled

i got this working without a problem when the remote serveur doesn't have the ssh parameter : PermitRootLogin yes My working ansible command: [ansible@myansible ~]$ ansible remoteserveur -a "cat /...
0
votes
1answer
25 views

Have the sshd host strings that are present in /var/log/auth.log been validated by sshd?

Since the log messages are written by the sshd daemon after an established connection, then my understanding is that the host strings have already been validated by the sshd daemon since the log ...
0
votes
1answer
23 views

First connection to Ansible : permission denied

I have a VM and one vps which both run on Centos 7. I created an ansible inventory file which contains : vps_ip ansible_user=root I got an error : Authentification or permission failure. I don't ...
0
votes
0answers
32 views

SSH port 22 : no route to host only for my VM [on hold]

I have one VM and two vps (all CentOs) I can connect to my vps via Mobaxterm with ssh (it's just a test to check whether my vps are down or not). When I try to copy ssh keys from my VM to my vps I ...
-1
votes
1answer
37 views

Command ssh connection for 1000 linux servers

Please help me out from below situation. There are 1000 linux servers with me. i need to find out which all servers are accepting passwordless connection from my master server. Below is the command i ...
0
votes
0answers
14 views

SSH ERROR: Unable to write random seed: open(“/home/user/.putty/randomseed”) returned 'Permission denied'

I'm trying to use plink to establish a connection to a remote server and remove an entry in SIP user list using the following command: plink root@<ip> -pw pwd serctl ul rm bob which then asks ...
0
votes
1answer
31 views

Get remote files by a list preserving their relative paths, and do it on a remote machine

1) I run SSH session on the remote client to get files from the server. 2) There is a server and it keeps a very broad directory structure. 3) I've got a list of thousands path-names to the files ...
0
votes
0answers
26 views

ssh on a vm - Address family not supported by protocol family

I'm trying to SSH into a Debian Buster Virtualbox host on my macOS laptop (Mojave), but keep getting the error Address family not supported by protocol family. Not sure how this could be an IPv6 issue ...
0
votes
0answers
24 views

How to enable TOTP-only authentication for SSH on Ubuntu 19.04?

I am trying to allow login to a server with only TOTP and I've installed libpam-google-authenticator and connected Google Authenticator app. Here are my relevant settings: /etc/ssh/sshd_config ...
-1
votes
2answers
40 views

Command not running from inside shell script [closed]

The script: #!/bin/sh scp /conf/acme/* gentooserver:/etc/ssl/apache2/ scp /conf/acme/* octopi:/etc/ssl/ When I execute it, I get output indicating at least the first command executes. (Plus the ...
0
votes
1answer
40 views

Remote SSH Gnu/Linux server isn't recognizing my pipe

Basically I'm trying to run the following command: sshpass -p "xxx" ssh root@x.x.x.x "tail -f /tmp/messages | grep ptp4l" | cat -n > output.txt I'm trying to get tmp/messages to continually write ...
-1
votes
0answers
36 views

How to SSH into one of the client devices connected to OpenVPN server?

EDIT: Thanks everyone, after some more searching with increasingly broad terms I found an article that explains the problem: https://android.stackexchange.com/questions/203996/how-to-connect-to-...
0
votes
1answer
29 views

Permission denied when I try to transfer file using scp -r

I am getting an error when I run this code: scp -r ./build/* rose@IP_address:/var/www/mywebsite.com/html Permission denied(publickey) lost connection It worked the first time but won't when I ...
-1
votes
0answers
33 views

I have created new user in linux, how can i activate its authentication setting?

I have created new user ubuntu using sudo adduser vyakar sudo it's home directory is /home/vyakar i also set the password for it at the time of the user creation but when i enter cd /home/vyakar it ...
0
votes
0answers
24 views

Cannot login to Google Cloud VM from SSH. Other alternatives?

I wrongly modified the /etc/network/interfaces file in my Google Cloud Ubuntu VM, now its networks are broken. As a result, I cannot SSH into the VM to fix it. I tried to use serial-port method, I ...
0
votes
3answers
75 views

Is there anything wrong with having separate SSH keys for different virtual machines? [closed]

Edit 2019-09-12: After everyone’s input. I’ve decided I need to research ssh key management so more. I will post outcome of research. I am running RHEL-7.7 as a host hypervisor. I am running several ...
0
votes
0answers
25 views

Ssh to remote hosts [duplicate]

Suppose I have 3 VM' s and each vm can ssh to each other and vice versa. My question is, is it possible to ssh to vm1 , then vm2 , and vm3 perform some operations in vm3 and get those results back to ...
2
votes
1answer
41 views

SCP as different user

I was wondering if it's an option to scp as different user(not the one who connects to remote server). For example, if user A has kerberos ticket to server X and user A has sudo access to user B. Is ...
0
votes
1answer
43 views

Recover lost ssh key still registered in gpg agent

I've been using a ssh key for a while by opening it using gpg agent. I do remember the gpg agent password, but I don't remember the ssh key. How could I recover the ssh key from the gpg agent?
2
votes
1answer
47 views

Does ssh-add honor the declarations made in ssh_config file(s)?

Background I use a 4096-bit RSA key-pair for authorizing access to my server. By ssh_config files I am referring to ~/.ssh/config and /etc/ssh/ssh_config. Here's what my ~/.ssh/config looks like: ...
2
votes
2answers
51 views

Allow “another” user to make personal backups on my server through sshd with no shell access (public key login)

I have set up a Ubuntu server at my home just to learn "stuff". I overdid a bit and have some spare room on my SSD. I am prepared to give a friend some of that space to make backups on my computer. He ...
0
votes
0answers
34 views

SSH freezes after entering password, Fedora

I recently installed Fedora 30 on my new laptop (Lenovo Thinkpad E495). My problem is: when I try to connect to my server through SSH, is asking me the password. I enter the password and after this ...
0
votes
1answer
35 views

Change default terminal color

I often have several SSH terminals open on different servers, and I am looking for a way to keep track of them more easily. I use MacOS Terminal app. I have already customized the prompt on each ...
-1
votes
1answer
27 views

Find Which Port Does SSH Client Used to Send Connection Request

I am interested in finding out which port number the SSH client used to send connect/authentication request to server (default on port 22). How can I discover it? SOLVED
3
votes
1answer
97 views
+50

Why can't I use tab for autocompletion in neovim over SSH?

When used locally on arch I can easily use tab for auto completion in vim when e.g. filling in a path with deoplete. If I SSH to this computer from my laptop then tab still works for completion. But ...
0
votes
0answers
24 views

Access a raspberry pi command line via ssh using remote port forwarding

We are attempting to deploy a small fleet of raspberry pis that we want to be able to remotely manage. To do this, we need to be able to ssh into the pi. I set up reverse port forwarding using on a ...
0
votes
0answers
30 views

ssh bind_address option not working on Ubuntu 18.04

I need to ssh and specify a particular network adapter. The ssh command in Ubuntu 18.04 doesn't have the -B bind_interface option, but does have -b bind_address. Each network adapter has a different ...
0
votes
1answer
23 views

oneko: Error and exit

I'm working on a Raspberry Pi Zero W running Raspbian GNU/Linux 10 (buster). Other X11 applications like xlogo, xclock, xosview, and even xeyes works perfectly well, but I have no luck running oneko. ...
0
votes
1answer
60 views

How to SSH using only private key?

Its my first time using SSH. How do I go about ssh-ing into a remote system using only the private key for the remote system? I tried ssh-copy-id my generated public key and ssh-ing using the given ...
1
vote
2answers
38 views

Remote SSH command is not working in Function

I am trying to set group permission on directories in remote instances using a function which will take input of directory and group and the function is as below total there are three instances of ...
5
votes
1answer
156 views

What is the protocol for sending files over SSH, in code?

I was reading some Go code that sends a file over an SSH client. https://github.com/tmc/scp/blob/master/scp.go#L33 One of the things it does is a scp -t /remote/path. What is that -t flag for? I did ...
0
votes
0answers
18 views

Grep a STDOUT of an ssh command

I have synced a Jupyter Notebook to a Spark EMR Master Node. Have written a script to automatically start it over ssh in a separate venv and forward the notebook http port. This works fine, but i need ...
0
votes
1answer
59 views

Passing comma separated variable to remote SSH Session

I am trying to read comma separated variable in shell script and splitting it like as below while [ -z "$variable" ] do printf 'variable: ' read -r variable [ -z "$variable" ] &...