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

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.

0
votes
1answer
22 views

Security issues about running VirtualBox with bridged-adapter

I set up a Gnu/Linux VirtualBox, and I configured networking to support both NAT and bridged connections, in order to ssh to it remotely from a different PC in my network. Since an IP was assigned to ...
0
votes
1answer
56 views

ssh asking for a password but not accepting it

I'm trying to scp through a virtual machine but when the guest terminal asks for my host user password it simply does not accept my real user password. Is the machine asking for another entry? The ...
0
votes
2answers
37 views

SSH-keys ipv4 ipv6 connection issue

Update: I found this question which seems to be very related. Not sure how exactly. What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like ...
0
votes
0answers
8 views

Run commands in Vagrant from outside script

I've got a script which checks whether Vagrant is running or not, if so it'll ssh into Vagrant if not then will run vagrant up and then ssh into Vagrant. After logging in, I need to run a couple ...
-2
votes
0answers
38 views

Need way to grep through files for malware

I am running into a lot of issues with some files being infected, however, I figured they are very similar code inside and I was thinking about grep-ing through files to find this snip of code. The ...
0
votes
1answer
36 views

Pipe and remote shell (ssh) [on hold]

I want this ssh user@host file_in=$1 'bash -s' << 'CMD' head /tmp/home/$file_in CMD Head is working if file_in is a file but fail when it is a named pipe. Any advice?
0
votes
1answer
28 views

SFTP over Midnight Commander still asks for a password

In linux command line, when I connect to sftp or ssh this, it connects using my public keys and doesn't ask me for a password. sftp user@host It also works when I do ssh user@host But somehow ...
0
votes
1answer
42 views

Bash Script to ssh into a macOS and execute a local script

I used the following command to initiate a ssh connection to a remote macOS .Objective is to perform successful ssh login and mount a particular network share (via the mount.sh script).The script ...
0
votes
0answers
36 views

Ctrl+a + d not only detaching screen but terminating it

I'm connected by ssh to a remote server with Debian where I use to put some experiments in screens and, I think after updating some packages because it worked before, I'm getting a '[screen is ...
-1
votes
0answers
27 views

ssh suspend doesn't work on windows

I'm a Windows 10 user with WSL running Debian(WLinux). I cannot suspend a ssh connection using ~^z. Other character sequences like ~. or ~? does work as expected. I have no trouble to use ^z to ...
-1
votes
0answers
19 views

How to execute script on remote linux machines [on hold]

I am trying to get df -h output from different Gnu/Linux hosts, and get output to my local host, while all remote hosts have different root passwords.
0
votes
3answers
55 views

UNIX SSH private key [duplicate]

Is it safe if my server will create a SSH key pair for my client? Scenario: I(server admin) will create a ssh key pair and put public key into authorized_keys and give the private key to client so he ...
0
votes
2answers
19 views

Add lines in every /public_html/.htaccess file

Is there a way to perform an .htaccess edit in bulk through ssh? I have multiple websites which goes like this: /home/user/website1/public_html/.htaccess /home/user/website2/public_html/.htaccess .....
0
votes
0answers
12 views

How to enable connection to SSH tunnel from network (Ubuntu 18.04 LTS)

I have a reverse SSH tunnel set up that is tunneling into my server. The remote servers web page can then be accessed via localhost:8080 on my server (just tested via curl). I want to make this ...
3
votes
1answer
28 views

Running a script prior to ssh login … but only once

I'm hoping someone can offer some insight on this problem, I found a solution to execute a script before an ssh login. It was done by placing the following line within /etc/pam.d/sshd and allowing pam ...
0
votes
1answer
27 views

Can you explain “lock your local display and not the remote one” by ssh?

From https://unix.stackexchange.com/a/505644/674 if you run light-locker through SSH on the remote machine, it will lock your local display and not the remote one (just as running gnome-terminal or ...
0
votes
0answers
18 views

Local port forwarding not working [duplicate]

I'm learning what port forwarding is and how to do it. I run this command: ssh -L 6900:https://wwww.google.com:80 localhost but when I try to reach localhost:6900, I receive: What am I doing wrong?
0
votes
1answer
27 views

Is there some program that can copy sparse file (/var/log/lastlog) over ssh as fast as cp (on local pc)?

I'm backing ip my server via rsync over ssh but /var/log/lastlog file is 1.2G (it takes only 24K on the hdd). On a local machine cp can copy it for no time (a few ms) but rsync requires reading the ...
0
votes
2answers
30 views

Copy folder to multiple (similar) locations simultaneously

I have around 90 websites I need a plugin installed on (wordpress) and I was wondering if there's a way to copy the plugin folder to all of them in a single run (i.e., simultaneously / in parallel).  ...
0
votes
1answer
32 views

remotely executing a command using ssh

Here I'm trying to remotely execute a command on multiple devices using ssh using while loop in bash however I'm getting output for the first IP in source file but not for others. cat HPE_FRAMES_IP ...
2
votes
3answers
58 views

How to SSH into Raspberry Pi connected via Ethernet on CentOS7?

I am trying to SSH into my Raspberry Pi 3 Model B V1.2 from my laptop running CentOS7. I have connected them together via Ethernet cable but the laptop is unable to identify Raspi. So i tried running ...
0
votes
1answer
23 views

Generating a ssh Host config file out of a Supperputty XML file

I am building a script that generates an ssh config file out of a Supperputty XML Session config file. I don't know which tool could handle it better. I try to achieve it with awk, but I don't receive ...
0
votes
1answer
11 views

Resuse SSH Connection on Remote Machine

There are 3 UNIX boxes: Client Bounce Box Remote The REMOTE machine only allows SSH connections from the bounce box. On the BOUNCE box I have the following in the local SSH config file: Host ...
2
votes
1answer
38 views

How to make alias interpretive?

I have a list of servers I often connect to, named like server001, server002... server999. I don't want to store 1000 alias hardcoded with these server names. I also don't want to write a function and ...
0
votes
0answers
19 views

OSX SFTP with Sudo?

I have been given access to a server to do some legacy development work. The server is running RedHat Enterprise Linux 6 as its OS. To access this server, I must first SSH in with my username/...
0
votes
0answers
56 views

SSH works but not SFTP

I am working on a project for a client from which we are using multiple docker containers on a host machine. I need to copy some files from my computer to the host machine, but when using an SFTP-...
-6
votes
0answers
75 views

Is VPN a layer 3 or 5 concept? [closed]

From Tanenbaum's Computer Network This demand soon led to the invention of VPNs (Virtual Private Networks), which are overlay networks on top of public networks but with most of the properties of ...
0
votes
0answers
35 views

Bind SSH client to two different host addresses

I have this port forwarding solution for testing purposes. There is a distant server named box and a local machine named tower, on two separate networks. box is accessible through the internet. On ...
1
vote
0answers
13 views

Vagrant: Problem with vagrant ssh when sha-1 key is in .ssh/config for unrelated host

I am using Vagrant to create hosts in network simulations. Recently, I re-installed an old pet-computer (ACME Foxboard, if you're interested) that still ran a very old Linux version. So old, that it ...
-3
votes
1answer
68 views

How can I lock the screen of a remote machine?

From https://unix.stackexchange.com/a/505644/674 When you're using SSH, you can access the screen you're connected from by using ssh -X or ssh -Y . Programs can perfectly run on a machine and ...
1
vote
0answers
43 views

Do VPN and SSH reverse port forwarding achieve the same thing?

https://en.wikipedia.org/wiki/Virtual_private_network A virtual private network (VPN) extends a private network across a public network, and enables users to send and receive data across shared or ...
0
votes
2answers
69 views

How can I find the mapping on `$DISPLAY` after `ssh -X`?

On machine B, I remote access machine C $ ssh -X t@C $ echo $DISPLAY localhost:10.0 How can I find/verify the mapping of $DISPLAY on C to $DISPLAY on B? Can it be done by the following command ...
2
votes
1answer
47 views

Adding SSH keys to ssh-agent on demand

Instead of invoking ssh-add to add every key to ssh-agent, is it possible to add those keys automatically as soon as they are asked by ssh? Likewise agents launched by desktop environments do? EDIT: ...
0
votes
1answer
44 views

Why can't I start a GUI program on the default `$DISPLAY` on a remote ssh server host?

I ssh to a remote host (without X forwarding). In the shell created by sshd on the remote host, why can't I start a GUI program on the default $DISPLAY $ eog Unable to init server: Could not connect:...
1
vote
0answers
9 views

Can any computer connect to a SSH server running on an android phone connected to a wireless mobile network? [migrated]

I run a ssh server on an Android phone using SimpleSSHD. When the phone is connected to a wifi network, I can connect to the SSH server from a computer in the same wifi network. When the phone is ...
0
votes
0answers
28 views

SSH breaking my terminal on unsuccessful command [duplicate]

In a an Scala application running on a remote computer, I've added a call I can make that opens a reverse tunnel to a port on a server with a public IP I can connect to afterwards. The tunneling ...
0
votes
0answers
43 views

How to allow SSH over PPP?

I have these two computers connected through ppp. One has ip 10.10.0.1 and the other has ip 10.10.0.2. Both also have the interface ppp0 with netmask 255.255.255.255: # ifconfig ppp0: flags=4305<...
0
votes
0answers
19 views

scp from Raspberry pi to SSH Server, “lost connection”

I am trying to copy a private key from my raspberry pi to an SSH Server (my Android phone, via SimpleSSHD app). I can successfully ssh in to the server from the Pi with: ssh 192.168.0.123 -p 2222 ...
-6
votes
0answers
30 views

What does “a locking program is launched from a X server” mean? [closed]

Is there some way to unlock server host's screen from VNC client side? says locking program work on the X server they're launched from. What does "a locking program is launched from a X ...
0
votes
0answers
26 views

Ubuntu 16.04 - Cannot SSH with root user, login successfully but closed immediately with return code 254?

I could SSH to 1 server with a non-root user. However, I tried to enable root login at /etc/ssh/sshd_config with this content: # Package generated configuration file # See the sshd_config(5) manpage ...
0
votes
2answers
59 views

Forwarding an entire desktop over SSH without third party tools

Something that's always bugged me and I've been unable to find good information on: How can you or why can't you forward an entire desktop over SSH (ssh -X)? I'm very familiar with forwarding ...
0
votes
0answers
23 views

My Linux based server for Node.js/Angular keeps crashing

For months my server has been going down every few weeks. I check logs in cPanel, I see that memory usage and CPU usage all normal till server goes down. There is no spike in resource usage prior to ...
-2
votes
1answer
56 views

How are `/etc/ssh/ssh_known_hosts` and `~/.ssh/known_hosts` used for client authentication?

SSH The Definitive Guide says OpenSSH maintains a single database serving both server authentication and client authentication. It is the union of the system’s known_hosts file (/etc/ssh/...
1
vote
0answers
28 views

No user exists for uid 721001106 when running ssh command within SSH chroot directory

I am running debian 8 with SSSD authentication. The authentication works and ssh works fine. I have copied all libraries etc over to my SSH chrootdirectory and all my applications work except ssh ...
1
vote
1answer
28 views

confused by netstat result

I ssh to my ubuntu server and run sudo netstat -a -p and I get this: tcp 0 0 ip-172-31-25-123.us:ssh mailDOTjjtoursDOTcom:54531 ESTABLISHED 1516/sshd: ubuntu [ And when I use my other ...
-1
votes
0answers
27 views

Can switching wifi network cause a ssh server to implicitly change its public and private key pair?

I run a vino server on a computer, and run vinagre (with ssh tunneling option) in another computer to connect the vino server. Then I move both computers from a wifi network to another wifi network. ...
-2
votes
0answers
32 views

Where are private and public keys stored?

I am confused by https://www.ssh.com/ssh/host-key Host keys are key pairs, typically using the RSA, DSA, or ECDSA algorithms. Public host keys are stored on and/or distributed to SSH clients, and ...
0
votes
0answers
13 views

How to access the floating ip in browser rather than a localhost?

I have an instances that was made in OpenStack which have a floating IP for its instance, the IP for this machine is 10.1.1.164. I tried to forward this instances so it will accessible in my firefox ...
0
votes
0answers
16 views

Unable to login passwordless after the changing the users password

for example, A user was locked on server C, i've reset it password. and after that it was unable to ssh passwordless from server B to C, which was working before. i've checked the authorixed_keys and ...
1
vote
1answer
36 views

Remove a list of files over SSH

I'm trying to do the following: Retrieve a list of remote files matching a glob pattern: existing_files=$(ssh user@example.com "ls pattern*") Add a new file that matches the pattern: scp ...