Questions tagged as ['ssh']

SSH, or "Secure Shell", is a networking protocol or client using SSH for securely connecting to a remote computer. This tag is for questions involving using SSH and troubleshooting SSH connection problems as well as setting up and configuring SSH for applications which use the SSH protocol. This tag should be used with other tags to better identify the environment of the problem. Questions should contain any logs from client and/or remote (see "ssh -vvv").
Score: 0
Newbie avatar
Connecting to sever through ssh
cn flag

I tried to connect to my sever through the ssh using ubuntu but it does not work.

 sudo apt-get install openssh-server openssh-client
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version (1:8.2p1-4ubuntu0.3).
openssh-client set to manually installed.
openssh-server is already the newest versio ...
Score: 0
Zi Gang avatar
Ubuntu suddenly log out when run some command
jp flag

When I run the chmod g+s /var/www/, it will suddenly logout my user..
but I was able to run the command chmod g+r /var/www/ without happened force log out..
I had tried different directory/user/root.. it seem to have same behaviour..

How can I debug this problem ?? I had tried to log my auth.log.. tail -n300 /var/log/auth.log | grep ssh.
it's seem like everything is normal..

I am try using ssh -vvv exa ...

Score: 0
nakbi avatar
How to prevent ssh client to access/view a specific folder
de flag

Using the SSH opened port, it was possible to verify the folders and the files present, under the directory /usr/share/SecretFolder They are exposed without authentication. My question it's possible to forbid interaction with them. or to hide this folder. It's possible to configure that in the Makefile of OpenSSH. Anyway, I need a solution.

Score: 0
Garam Lee avatar
How can I allow access to SSH only at a specific time?
in flag

Based on Ubuntu 18.04,

I want to allow users to access only from 9 a.m. to 5 p.m.(working time) on the SSH server. (used OpenSSH-server package)

I've looked up all the materials I think will help you from user management to PAM settings on Google, but I don't think there's any information to restrict access by SSH time zone.

(But, I have not to use firewall-related services like ufw.)

If you can help ...

Score: 0
Supreet Singh avatar
Using Openfortivpn and the Ubuntu VM I ssh into is not connected to the internet
cn flag

I am working remotely, and I am using the OpenFortivpn to connect to the companies network. I am able to ssh into the VM, but when I ran the update command it did not run. Ping did not work too. I have tried setting up the proxies, and it still did not work.

Score: 1
CantCodeForShit avatar
Re-enabling Third Party Entries in sources.list through SSH (remotely)
fr flag

Wondering how you can do this? Upgraded from version 16(.?) to 20.04.3 LTS, and I got this message, I use it for a fair bit of port-forwarding and streaming and etc, using it as a media server, and I'm just wondering how to do this?

I didn't initially set this up, but yeah I am curious as it does say

Some third-party entries in your sources.list were disabled. You can re-enable them after the upg ...

Score: 0
Austin avatar
Suddenly can't access samba share from windows 10 file explorer after it was previously working Ubuntu Sever 20.4
gf flag

I got ubuntu server up and running perfectly, everything is working exactly as intended. I was doing a file transfer to move all the things I wanted to back up, the exchange finished and a few hours later I noticed I could no longer connect to my Samba share folder from my computer anymore

I have literally changed nothing and I'm not sure what to do steps I've taken to solve the issue that haven' ...

Score: 0
S224 avatar
SSH to VM running on Virtual Box | kex_exchange_identification: read: Connection reset by peer
mx flag

Hi I'm running my VM on virtual box and trying to ssh to it from my MAC.


Adapter 1:

  • NAT
  • Port Forwarding entry,
  • TCP
  • Protocol: TCP
  • Host IP:
  • Host Port: 2222
  • Guest Port:22

Adapter 2

  • Attached to: Host-only Adapter
  • Name: vboxnet0

After running: ssh [server]@ -p 2222 -vv

I get the following error:

kex_exchange_identification: read: Connection reset by peer

terminal output:

Score: 0
SteinB avatar
Ubuntu 18.04.4 LTS production server: no network, no ip adress & No carrier
ca flag

We have a dedicated offsite server in a server center and yesterday suddenly we lost connection to the production server. No one was working on the server at the time. I only have a RemoteConsole access to the server.

When i ping something it states

connect: Network is unreachable

The Ubuntu 18.04 server looks like it has lost connection to the public network. Customer service at the server  ...

Score: 2
Adonis Cedeño avatar
Using a PuTTY private key from windows to linux
cn flag

I've generated two keys on PuTTY: public and private. Using this software on windows I can connect to the server as usual.

Then I tried to copy those files in my ubuntu machine (21.04), and logged in loading the private key (open putty, write the user@hostname and then load the private key at SSH>Auth), but there is unable to connect being rejected by the server as this error says:

Unable to loa ...
Score: 2
Harold Burbano avatar
Problems with git clone
in flag

I have a problem cloning a repo when I use http:

git clone

throw me an error :

fatal: unable to access '': gnutls_handshake() failed: Error in the pull function.

so when I use ssh:

git clone

stays loading forever :

Cloning into 'responsive-design'...
remote:  ...
Score: 0
No verification for DSA key ID 46181433FBB75451
tr flag

Hello Ubuntu comunity!

Greetings from Czech republic, Europe. Sorry for my very simple english, as I'm not good in it and I even do mix it with german and czech. Also sorry for local language from Terminal outputs. If some one please could help me out, I would be really very glad.

To the issue: I try to make a Lubuntu 18.04 installation USB stick for i686 notebook. But I do not get a OK for ISO file ...

Score: 0
Nicholas Yoannou avatar
Ubuntu - force killing a service
ru flag

I've seen a few topics on this before on AskUbuntu and bits and pieces from other forums but no answer actually solved my query. I'm trying to kill a service on my Ubuntu machine via SSH (Terminal), here's the things that I've tried:

  • used systemctl kill [servicename]
  • used htop to kill the processes

Is there a way to edit the service file (possibly) so it'll kill the service instead of trying to sh ...

Score: 0
gelonida avatar
How to keep an encrypted home directory mounted (even after logout)
kr flag

Sometimes I'd like to ssh to a machine, mount my encrypted home directory and disconnect and keep the directory mounted.

What I managed already to do is

  • ssh to my machine (without password only public keys are allowed for security reasons)
  • create a tmux session
  • mount the file system in the tmux session
  • cd into the home directory
  • execute some script that will run for a long time
  • detach the tmux sess ...
Score: 1
Zi Gang avatar
How to redirect to reverse tunnel server with different port?
jp flag

Server A ( Hosted in private network, need VPN access )
Server B ( Public hosted )
Server C ( U can assume is my own macbook )

I use autossh to setup my reverse tunneling at server A
with this command autossh -f -T -M 20002 -o "ServerAliveInterval 10" -o "ServerAliveCountMax 2" -N -R 19999:localhost:22 user@server_b

Then in my Server B
I able to run ssh localhost -p 199999 to connect my server A. ...

Score: 1
CPH avatar
Error starting ProtonVPN from CLI using SSH
in flag

If I'm physically at my desktop, I can start protonvpn with no issue using the command protonvpn-cli c.

However, when I'm connected remotely via an SSH connection and run the same command, I get this error: Unable to setup reconnect. Please make sure that you have access to internet or that you've previously connected to another server.

I've not had any luck searching around on forums yet, so any help w ...

Score: 0
KrisP avatar
ubuntu core - best practice for backup public/private keys
br flag

we are testing to use Ubuntu Core for our IoT sensor/control devices

I was trying to emulate a situation, where if a key is compromised, what is the best practice for the ssh key pair. In all the examples, the instruction is to create only one pair. In case of a compromise, one would want to immediately delete the compromised key first.

I used the following method to create 2 key sets - one as main ...

Score: 1
Marvin S. avatar
How to stop outgoing brute force attack
dz flag

I got a email from my ISP that my server tried to access another server via ssh multiple times. I ran multiple scans on the hole machine and it turns up nothing.

Any idea how I can remove the malware and determine how to close the security issue?

Score: 1
Nameless avatar
How to add a specific path for FTP user home?
cn flag

I installed recently vsftpd and added a user called ftpuser. I created the /etc/vsftpd.conf file from scratch with the following info:

pam_service_name ...
Score: 0
user6210457 avatar
Netconf Server Password Configuration
mx flag

I want to create a netconf server and client, by using yangcli. I use Ubuntu 20.04 LTS as a Windows Subsystem for Linux (WSL). I want to open two terminals on the same computer, one as server, the other as the client. I can create the netconf server, but when I want to connect to it by using yangcli it wants user, server and password as parameters. It wants password from me, but I didn't configure any p ...

Score: 1
BlandCorporation avatar
How might an Ubuntu machine that has full-drive encryption be altered remotely to enable remote reboot?
cn flag

I've got a remote machine that was set up with full-drive encryption. I need to remotely reboot the thing. Is there some way to remotely alter the machine such that the passcode for decryption gets entered before boot, or some way to remotely remove the encryption? I know all of these things go against the security model, but the thing needs rebooting and I don't have in-person access to it.

Score: 0
Denis640Kb avatar
ubuntu server wrong password aes128-cbc while ssh
ru flag

Ubuntu server 20.04.3 TLS Trying to connect ssh, but there is error
no matching cipher found. Their offer: aes128-cbc,3des-cbc
Then i tried to connect by
ssh -c aes128-cbc loggin@
And getting error with Permission denied (password,publickey).
I'm pretty sure the password is correct, but I don't quite understand. Maybe this password should be encrypted somehow? Tell me, please, rum ...

Score: 0
Carlos Garcia-Vaso avatar
Can't generate SSH ed25519-sk key
cn flag

I'm trying to generate an ed25519-sk SSH key in Ubuntu 20.04.03 LTS. However, I get a 255 error code when I try. I'm using OpenSSH version: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020. See below for the command I'm using and its output:

$ ssh-keygen -vvv -t ed25519-sk                                                     
Generating public/private ed25519-sk key pair.
You may need to  ...
Score: 2
BlandCorporation avatar
How can a reverse-SSH connection be launched and maintained on Ubuntu boot with systemd?
cn flag

My mum has a wee laptop that needs, when it boots up, to reverse-SSH connect itself to a server (so I can help out when needed).

I'm struggling to get the connection to persist when it is started by systemd.

In / I've got something like this:

while true; do
    ssh -R 19123:localhost:22
    sleep 1000

In /etc/systemd/system/reverse_SSH.service I've ...

Score: 1
edwardliang2019 avatar
Why can't I run programs after closing SSH connection using setsid, nohup or disown?
no flag

I am attempting to run a program 'a.o' on a remote server. To keep it running after closing SSH connection, I tried the following:

setsid ./a.o
nohup ./a.o
./a.o &
disown -h %1

None of these options seem to work, and I cannot figure out why. Any ideas on how to fix this problem?

P.S. I am using a tunnel connection to connect to the server via a jump machine. Also, this is a program that inv ...

Score: 0
Zorono avatar
Trying to restrict my SSH server access to 'private ssh key only'
in flag

Good Morning, I need to force my SSH server to deny any connection which doesn't have my private SSH key... and not to ask a password

My /etc/ssh/sshd_config:

Include /etc/ssh/sshd_config.d/*.conf

Port 22
#AddressFamily any
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#Rek ...
Score: 0
Della avatar
Bash Autocomplete Package with IDE-like Feature
my flag

Using Ubuntu 20.04. I was wondering is there an open source package or extension that will make the bash terminal feel like an IDE with dynamic autocomplete suggestions while typing (without pressing tab and moving to the next prompt).

I have in mind something like this, as offered in any IDE.

Screenshot from Atom Editor

For example, when I type git, it should be pretty obvious it will be followed by clone, stage or push e ...

Score: 0
ssh: connect to host port 22: Operation timed out
in flag

I have read every related questions but could not find solution yet. I am still new to AWS but managed to set up an instance and deploy my website. My uwf status was inactive so I hit sudo ufw enable but I forgot to hit sudo ufw allow ssh and now I can not use ssh when I press ssh -i /Users/xyz/files/webshop.pem in my mac terminal. Is there any rapid way to manage the issue withou ...

Score: 0
End ssh session in remote machine with Byobu
th flag

I'm new to ssh and working with remote machines. I have the problem that I press Ctrl-D to exit the session but I just exit Byobu in both client and host machine, but when I open Byobu again, I am still connected to the host.

My question is, how can I end my ssh session/connection with the host machine?

I use Ubuntu 20.04 on both machines.

Score: 0
Royal avatar
Access to my local server from laptop
kp flag

I have a local GPU machine at home and want to be able to connect remotely to it with the laptop. What are the best practices and solutions for this?

Local GPU machine: Ubuntu 20

Laptop: Mac os


  • I want to do programming (e.g. vs code) and run my code on the local server.
  • It's fine to have terminal-based access (e.g. ssh). But I also need to synchronize my code between local machine and laptop  ...