Questions tagged [ssh]

SSH, otherwise known as "Secure Shell", is a method for securely connecting to a remote computer.

Filter by
Sorted by
Tagged with
357
votes
8answers
851k views

How do I change my username?

Some time ago when I installed Ubuntu I chose a rather stupid username for my account that I do not want to use anymore. How do I change this (including the name of my home directory, and the name ...
277
votes
10answers
371k views

How can I set up password-less SSH login?

I want to be able to login to a remote via ssh without having to enter the password all the time. How do I set it up? Is a different command required to execute a password-less session?
722
votes
14answers
771k views

How to keep processes running after ending ssh session?

Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?
131
votes
13answers
152k views

How to harden an SSH server?

What measures can/should I take to make sure that security around my SSH server is absolutely impermeable? This will be community wiki from the start, so lets see what people do to secure their ...
135
votes
4answers
277k views

How can I chroot sftp-only SSH users into their homes?

I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see. I've created a user called bob ...
37
votes
4answers
158k views

What is the simplest way to have remote GUI access to Ubuntu 16.04 “server” from Ubuntu 16.04 “desktop”?

I'm trying to figure out what is "lightweight" way to configure my Ubuntu 16.04 LTS server to have access via GUI (over SSH as option). I would like to reach it from my Ubuntu 16.04 workstation. I ...
37
votes
4answers
70k views

Simple & easy way to jail users

I need a simple and easy way to jail users in their home directories in Oneiric. Do you have a simple configuration for jailing users, with full help, or some good web links? I would be offering an ...
23
votes
2answers
53k views

Remote login with graphical display manager (GDM, LightDM)

Is it possible to remotely (via ssh) make a login to GDM? I'll explain a situation in which I'd need this: I'm on my laptop and connect to my desktop via ssh. I realize there are some updates ...
141
votes
5answers
941k views

How to enable ssh root access on Ubuntu 14.04

I´d like to enable the ssh root access on Ubuntu 14.04. Editing the /etc/ssh_config (PermitRootLogin yes) didn't affect anything.
12
votes
1answer
8k views

Filezilla or WinSCP alternative for Ubuntu

On Windows I'm using FileZilla to upload/download files on my WordPress website, via sftp, while using ssh key. Now Linux is my primary operating system. For the last month FileZilla client was ...
137
votes
18answers
880k views

SSH Permission denied (publickey)

I am trying to connect to a Linode (running Ubuntu 12.04 LTS) from my local machine (also running Ubuntu 12.04 LTS) I have created a private and public key on my local machine and copied my public ...
25
votes
4answers
29k views

SSH Server stops working after reboot, caused by missing /var/run/sshd

My VPS wasn't rebooted for about 3 months. It is hosted on a server with OpenVZ virtualization type and the operating system is Ubuntu 16.04. For some reason, I rebooted the VPS and after that, I ...
231
votes
4answers
427k views

How do I configure a new Ubuntu installation to accept ssh connections?

I just installed Ubuntu. How do I set it up to allow me to ssh into it? Right now I get "ssh: connect to host x.x.x.x port 22: Operation timed out".
118
votes
3answers
309k views

How to start a GUI software on a remote Linux PC via SSH

Sometimes I need to start XMBC media player or other GUI software a one of my PC (small Xubuntu PC used as a media center). Usually I do this starting a X11vnc server on the remote PC via SSH and ...
14
votes
4answers
16k views

How do I run a graphical application on a remote server when logged in through SSH?

I am trying to run gedit from an SSH terminal on Windows, connected to an Amazon EC2 instance running Ubuntu 12.04 Server and I am getting this error: Cannot open display: How do I fix it?
379
votes
8answers
712k views

Easiest way to copy ssh keys to another machine?

I am lazy at home and use password authentication for my home machines. I am ready to move to key based authentication. There are many options on the web on how to do this, including catting then ...
1
vote
3answers
3k views

Secure an Ubuntu OpenSSH server from Brute force attacks but without a firewall or SSH key pair? [duplicate]

I use Ubuntu 16.04 and seek to harden my SSH authentication in a special manner. The current situation: I have a machine with a minimal Ubuntu server I use mainly to transfer files to via its local ...
30
votes
4answers
9k views

How does using the tilde work as a shortcut to my home directory?

I was confused, trying to copy some files from one PC to another. I have it figured out, but the syntax is still confusing to me. This works: scp ~/Desktop/Volenteer.png jay@server.ip:~j0h/b which ...
121
votes
2answers
141k views

How to create a restricted SSH user for port forwarding?

ændrük suggested a reverse connection for getting an easy SSH connection with someone else (for remote help). For that to work, an additional user is needed to accept the connection. This user needs ...
122
votes
7answers
114k views

How do I SSH to machine A via B in one command?

I want to access a computer, say machine A which is based in my university's network. However, this computer is only accessible via the internal network of the university, so I can not use SSH to this ...
47
votes
4answers
213k views

How to set up passwordless SSH access for root user [duplicate]

I need to configure a machine so software installation can be automated remotely via SSH. Following the wiki, I was able to setup SSH keys so my user can access the machine without a password, but I ...
34
votes
4answers
76k views

How can I install Ubuntu on a device without a screen nor a keyboard?

This is tricky. I would like to install Ubuntu on a machine that is intended to work as server, and for some reason I do not have an option to connect a screen to it. I expect this may be similar to ...
16
votes
6answers
33k views

How can I access my Ubuntu phone over ssh?

Whenever I try to run apt-get install openssh-server I get the following errors: root@ubuntu-phablet:/home/hablet# apt-get install openssh-server W: Not using locking for read only lock file /var/lib/...
3
votes
2answers
3k views

While loop only processes the first entry of ssh command

So I don't know much about bash and need some pro help. I am trying to run a script like this one: filename='file1' while read p; do ssh -p 2222 $p 'who -b' | awk '{print $(NF-1)" "$NF}' >> ...
3
votes
1answer
2k views

Access remote multiple servers behind NAT

I have a situation where our Ubuntu servers were deployed across multiple remote locations. These servers were behind a carrier grade NAT and also an internal NAT. Now from a central location I want ...
138
votes
2answers
263k views

How do I keep track of failed SSH log-in attempts?

I'd like to see if somebody has been trying to log-in by brute-force into my Ubuntu 12.04 server over SSH. How can I see if such activities have been taking place?
113
votes
14answers
1.1m views

How to solve 'Connection refused' errors in SSH connection?

I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty. The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error ...
34
votes
3answers
155k views

Can't SSH in as root

I'm using the default installation of openssh-server for my Ubuntu 14.04 server. I can connect through the console as root like normal, with my username and password. When I try to SSH with the same ...
21
votes
10answers
18k views

Long wait time on login

When I log in on my server I get this: No mail. Last login: Fri Nov 5 14:22:45 2010... then I must wait for 5 sec and then is ready... wolfy@ubuntu-server:~$ Is this wait time normal or should I ...
3
votes
1answer
2k views

Connect via ssh to one of the multiple clients on same network

let's imagine i am at school with an android phone. I have a computer at home and that computer has a virtual machine working on it. here is the scenario, client and virtual client has ssh-client and ...
139
votes
8answers
181k views

Enter SSH passphrase once

Before upgrade When I was running git clone git@... (using ssh) once per computer restart a window dialog appeared containing a textbox for inserting my SSH passphrase and confirmed with OK. Then the ...
44
votes
6answers
43k views

How to use SSH (ssh & rsync commands)?

How can I SSH with a remote server so I can browse files and edit them? I have a username and password to use.
32
votes
4answers
236k views

permission denied for root@localhost for ssh connection

I just installed Ubuntu 14.04 and LAMP on that. Then, I wanted to configure my server, so tried out This tutorial. When I give the command: ssh root@localhost I get : Permission denied, please try ...
4
votes
1answer
2k views

SSH is allowing remote connections only after a local login to the server

I have installed Ubuntu Server 16.04 32-bit on my old notebook wirelly connected to internet (external IP). Since the beginning I've added ufw and Fail2ban. But then I discovered after a reboot I ...
1
vote
1answer
11k views

Permission denied when trying to run a script that uses 'sshpass'

The idea is to make this script run without needing to type any passwords of the hosts (written down in the Hosts.txt file). Right now, when I'm running this, I get a Permission denied, please try ...
93
votes
7answers
92k views

Locale variables have no effect in remote shell (perl: warning: Setting locale failed.)

I have a fresh ubuntu 12.04 installation. When i connect to my remote server i got errors like this: ~$ ssh example.com sudo aptitude upgrade ... Traceback (most recent call last): File "/usr/bin/...
47
votes
2answers
45k views

Host alias for ssh

There are a few SSH destinations I will frequently be connecting to and I'm wondering if rather than remember the IP address I can create a host alias for them. I'd like to be able to use... ssh -p ...
33
votes
4answers
44k views

How can I reconnect to a ssh session after a broken pipe?

So I was running apt-get upgrade on a server when the router decided it had been too long since it last made me angry: It dropped all connection. Moral of the story is to use screen a lot when you're ...
10
votes
2answers
9k views

How to use ssh to transfer files from computer a to local computer

I am trying to get some files off of my school Linux account using ssh. I have got the connection to work using: scp <school_server>: ~/folder I want ~/where I want to go. But when it goes ...
12
votes
1answer
5k views

I can't type a “b” when I'm in the command line

Update I can't even paste a b. I am trying to upgrade to Ubuntu 15.04 but I need to delete some files in the /boot directory. When I cd /oot I can't type a b. So, I thought, I will list the files in ...
2
votes
1answer
10k views

Keep running a python program even after logging-off the ssh session [duplicate]

I python script called scrape.py. As the name suggests it is a web crawler and I want it to run continuously on my Linux machine even after I log out and end the ssh session. I read a lot around here ...
1
vote
1answer
2k views

Failed to SFTP connection

I want to configure user ftpuser to sftp for an existing apache owned directory /var/www/webiste I added it as new user and made /var/www/webiste its home directory, useradd -md /var/www/website -s /...
320
votes
10answers
686k views

How to prevent “Write Failed: broken pipe” on SSH connection?

What can I do to configure SSH on both client and servers to prevent Write Failed: broken pipe errors? It often occurs if you sleep your client computer and resume later.
204
votes
9answers
750k views

How do I add SSH Keys to authorized_keys file?

I have an Ubuntu server on Amazon EC2, that I use for development, and today I stupidly cleared everything out of my ~/.ssh/authorized_keys file. Luckily I have an SSH open, so I am still connected, ...
80
votes
5answers
127k views

Mount remote directory using SSH

How to mount a remote directory using SSH to be available same as if it is a local directory?
61
votes
7answers
159k views

How do I launch a remote firefox window via SSH?

When I SSH to a remote box $ ssh -X remotebox then start firefox on the remote box remotebox$ firefox and I have firefox running on my local machine, a local firefox window will open. no firefox ...
31
votes
2answers
15k views

Disable password access through SSH?

I'm setting up a server for backing up my desktop box remotely. I want to prevent remote password access to the server, permitting only users with private keys (AKA my desktop box) to access it. How ...
22
votes
2answers
33k views

What does “pts/” in the output of w mean?

When I run w - to see who is logged on and what they are doing, i see this: USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty7 :0 08:14 10:32m 44:...
6
votes
4answers
5k views

X Server for Windows?

I'm going to accessing my ubuntu machine remotely from my windows machine through putty. Are there any suggestions for possible ways to get an X server running on my windows machine? Thanks.
2
votes
4answers
50k views

Network error: Connection refused putty

I am trying to log in to my server with ssh keys (I use putty to do it) but every time I try to connect it says Network error: Connection refused. I believe it's something wrong with the public key ...

1
2 3 4 5
11