Linked Questions

45 votes
1 answer
148k views

How do I set up SSH authentication keys? [duplicate]

Possible Duplicate: How can I set up password-less SSH login? I am using ssh to connect to a remote server. I am prompted to provide a password each time, but I recall being able to set up a sort ...
TLP's user avatar
  • 3,241
4 votes
1 answer
30k views

Permission denied (publickey) error right after generating the SSH keys [duplicate]

I know this question might have been asked before But I still cannot really find the answer, and the answer in my case should be simple. So what have I done is in my ECS server I created a new user ...
Frostless's user avatar
  • 143
0 votes
1 answer
8k views

Automating file transfer using Bash scripts in SSH on my new server from old server [duplicate]

How can I connect to a remote host using SSH and create one Bash script to copy all files and folder from my old server to my new server for backup every day?
Anirban Ghosh's user avatar
0 votes
2 answers
3k views

is it possible to rsync to another server using crontab? [duplicate]

Hi there is a bunch of videos and resources on how to rsync locally rsync /home/user1 /home/user2/backup, but i haven't found any tutorials on rsync crontab to another server pretty much, i use ...
user2805313's user avatar
0 votes
1 answer
4k views

How to setup login your SSH server with Public/Private key authentification? [duplicate]

Possible Duplicate: How can I set up password-less SSH login? I am having a debian based linode server. All the time if need to login to remote server i do ssh user@ip and then I enter my ...
Mohit Jain's user avatar
  • 1,139
0 votes
1 answer
917 views

Shell script that fetches file with SCP [duplicate]

I want to build a shell script that runs daily and fethces a file from another server using SCP command. The problem is that when i enter this command in terminal it asks me for password. a) How ...
Solo's user avatar
  • 57
0 votes
1 answer
3k views

Shell script ssh to login multiple servers with password passing from a file [duplicate]

Shell script ssh to login multiple servers with passing password from a file for example: Password file name : password.txt and the password is "test123". ssh_script: ssh testuser@testserver &...
Beginner's user avatar
  • 491
0 votes
1 answer
1k views

Passwordless SSH [duplicate]

Can we set up Passwordless SSH in Ubuntu (18.04) without root privileges? Is there any way to access files in /etc directory without root permissions? (I need to be able to set up Passwordless SSH ...
Jagriti Dixit's user avatar
0 votes
0 answers
1k views

Multiple scp commands in bash script, but entering password only once [duplicate]

I currently use a bash script in the following format to update local data with remote one: usr=$1 scp -P 4444 -r [email protected]:/some/folder/*Tools /home/localUser/someFolder/ scp -P ...
Markus Weninger's user avatar
1 vote
0 answers
615 views

SSH connecting with one command line [duplicate]

Possible Duplicate: How can I set up password-less SSH login? I'm trying to connect to the ssh with the following command: ssh user:pass@host bit still it's asking the password, how can I login ...
Mokus's user avatar
  • 4,502
0 votes
0 answers
84 views

14.04: How to ssh/scp as root with NO password prompting? [duplicate]

We upgraded from 12.04 to 14.04. We have a dozens of processes that perform automation tasks for us and we use root with ssh/scp. After the upgrade root couldn't ssh/scp into the servers at all. We ...
Van's user avatar
  • 771
1 vote
0 answers
59 views

SSH for ubuntu touch [duplicate]

For some reason, while I am trying to connect to SSH on my Nexus 7 2013 I keep getting this error message: Permission denied(publickey) Can someone explain how to properly setup SSH for Ubuntu touch?...
user296914's user avatar
466 votes
8 answers
949k 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 ...
Jorge Castro's user avatar
  • 71.8k
112 votes
15 answers
276k views

Can you set passwords in .ssh/config to allow automatic login?

I'm using Ubuntu 11.10 and ssh for connecting to many servers daily, so I put their parameters in the .ssh/config file like this: Host Home User netmoon Port 22 HostName test.com Is there a way to ...
Netmoon's user avatar
  • 1,448
55 votes
3 answers
6k views

How can I use a passcode generator for authentication for remote logins?

I would like to strengthen the authentication of my SSH logins by adding another factor: a passcode generator device, or a passcode generation application on my mobile phone. The only obvious options ...
Jorge Castro's user avatar
  • 71.8k
20 votes
4 answers
12k views

SSH without password with non-default identity file location

As part of a startup script I have to automatically open several gnome-terminal windows, one of those terminals automatically send: ssh [email protected] The limitation with this is that I still need ...
hiigaran's user avatar
  • 6,483
11 votes
5 answers
72k views

SSH public key authentication doesn't work [duplicate]

I'm having trouble setting up public key authentication for an SSH server on Ubuntu Server 12.04 (A) for authentication from an Ubuntu Server 13.04 (B). What I'm doing now (I'm trying to follow the ...
user avatar
11 votes
2 answers
32k views

How to save SSH options and connections in Ubuntu? [duplicate]

I have at this time two remote machines to which I am connecting. For one I am using private key with passphrase, and another one I am using root password. Now, when I want to connect to machine ...
Alan Kis's user avatar
  • 237
9 votes
4 answers
10k views

How can I autostart a SSH -D tunnel at login for a SOCKS proxy?

I know that if I want to start an SSH tunnel ssh -d 9000 user@userserver This is one solution for a dynamic tunnel to be opened on port 9000 for a user named "user" on the host "userserver" ...
dalanmiller's user avatar
0 votes
2 answers
25k views

How to ssh using perl scipt,run a command, and return the output...?

As clearly explained in the question, kindly give me an option to ssh to a machine using perl script, run a few script lines there, and return the output to the source machine. Found out a few docs ...
kiran bbnl's user avatar
1 vote
2 answers
12k views

how to turn off password-less login for ssh?

I had setup password-less SSH login from my desktop to my laptop following the steps here. Now I want to turn off the password-less login so that when I ssh from my desktop to my laptop, it will ask ...
In78's user avatar
  • 623
8 votes
2 answers
1k views

Why should we expire a locked account to totally prevent access?

From man usermod: Note: if you wish to lock the account (not only access with a password), you should also set the EXPIRE_DATE to 1. Why should we expire a locked account to totally ...
Sinoosh's user avatar
  • 2,031
3 votes
2 answers
13k views

How can I log on as root to a cloud instance?

I can log in successfully to my cloud instance as user 'ubuntu' via SSH but cannot log in as user 'root'. There are several posts extant concerned with altering the ssh config in order to allow root ...
James Smith's user avatar
6 votes
1 answer
15k views

Execute bash script on remote server non-interactively

I have a bash script that accepts exactly 3 arguments and I have created a web interface in PHP to run this script on a remote server. The user just enters username host and password of the remote ...
Amarjit Singh's user avatar
3 votes
3 answers
9k views

How do I include a password with SSH command? (want to make shell script)

I'm trying to SSH to a server on startup with a .sh script, but that will require me to enter the password for the account on the server that I'm SSHing to. I did some RTFMing, and I see in "-o" that ...
Eva's user avatar
  • 893
3 votes
2 answers
3k views

Persistent SSH Connection

I use this command to make an SSH tunnel to a remote server. ssh -D localproxy:9999 -C [email protected] I also made a shell script using expect command to auto process entire process with also ...
8thperson's user avatar
  • 248
1 vote
3 answers
6k views

Can I create an SSH login script?

I have to log in to my school's Linux server for homework. I would like to be able to make a script or something for my desktop to save a bit of time (using Ubuntu desktop). Currently I log in using ...
SkinnyGeek1010's user avatar
2 votes
1 answer
8k views

Ubuntu Server via LAN

I was wondering if the following would be possible (and hopefully get some pointers on how to get this done). I would like to install Ubuntu Server on an old computer and be able to connect to it and ...
V.Vocor's user avatar
  • 147
0 votes
1 answer
11k views

SSH script password input [closed]

So I am running Linux Mint 17.2. I have a bash file I would like to run in terminal to login via SSH into my other mint 17.2 server. I am able to do this manually no problem, but when I try using ...
nomad12321's user avatar
0 votes
3 answers
9k views

Script for remove files using SSH

I have a script that uses scp to backup some files of my PC into another PC connected in LAN, something like that: #!/bin/bash scp some_directories host@ip-address:backupFolder/ I use a public Key ...
Red's user avatar
  • 849
2 votes
3 answers
5k views

Multiple Users Private / Public Keys

I am currently undergoing a project of maintaining a server with certain simple services (mail, web) for a group of thirty users. I would like to use pub/private keys but I guess unsure of their use. ...
DuckDuck's user avatar
2 votes
1 answer
3k views

How to login to SSH and have username and password automatically entered?

I've been using nothing but Windows for years. I'm transitioning to Linux and I'm trying to make the transition as easy as possible since I have almost no knowledge of Linux. On Windows, I currently ...
Jeff's user avatar
  • 121
2 votes
1 answer
3k views

How to use ssh key in gftp?

I ssh to a remote server from command line using key to not enter password at any time want to connect. I need to transfer some files to the server using gFTP software. Is it possible to use ssh key ...
hd.'s user avatar
  • 3,877
5 votes
2 answers
2k views

Passwordless SSH only works when I'm already logged in on SSH

So I set up passwordless ssh using the following: How can I set up password-less SSH login? After setting this up, I'd expect that I wouldn't need a password to ssh. My issue is that on my first ...
henry's user avatar
  • 53
0 votes
2 answers
2k views

How to install ssh private key?

I used to have old laptop with Ubuntu desktop 18.04 and dell server with Ubuntu server 18.04. On the laptop and server was installed ssh keys and I could connect to server without password. Now I got ...
Cryptus DEV's user avatar
2 votes
2 answers
3k views

Mount drive on remote machine

My current set up is: I have my main machine (Darkseid) upstairs which has a drive with all my films on it, which I don't keep mounted. Downstairs, next to the tv, I have a htpc (Archangel) which ...
NikolaiDante's user avatar
0 votes
1 answer
4k views

How do I copy the contents of user/.ssh/known_hosts to the same file under root?

I am trying to accomplish passwordless ssh-ing from root. To be clear, I want to log in from the local machine at root to a /home/user folder on remote. Have established the connection between user@...
knl's user avatar
  • 127
0 votes
1 answer
3k views

Key rejection when do ssh

I have /root/.ssh folder with authorized_keys file inside of it with client public key. Root logs in fine without password by using ssh. In case I do login with another user system reject key and ...
vico's user avatar
  • 4,537
0 votes
1 answer
4k views

Changed root password by sudo passwd root but I can not login with root login

Hei, The title is self-explaining. I installed Ubuntu Server 18.04.03 LTS + Canonical Live Patch. I logged it with my username created during installation and run sudo passwd root and changed root ...
Nima Masalegooha's user avatar
6 votes
1 answer
938 views

Use a sudo to mount an external disk on remote device

I'm currently working on two devices, one testing the other. They are based on beaglebone black, and run under Ubuntu 14.04. My problem is I have to detect and mount a USB external storage on the ...
Incarcerion's user avatar
1 vote
1 answer
2k views

shortcut to automatically paste a specific string in terminal

I have to connect to several ssh connections daily and they all have the same password, which is really complicated (enough that it is virtually impossible to memorize it). So what I have to do ...
TomCho's user avatar
  • 364
1 vote
2 answers
1k views

Is there a way to open 4 terminal windows every time I login?

I want to open four terminal windows into the first pane (upper left-hand side) when ubuntu boots. I have two terminal profiles: default and Mail. I want two of the windows Mail windows, and the ...
user25379's user avatar
0 votes
1 answer
3k views

Permission denied (publickey) while copying id

I was trying to copy a key id for password-less SSH access, however it seems that the password authentification is no. I am not sure how to change that. Here is the original code: ssh-copy-id xxxx@...
Falio's user avatar
  • 35
2 votes
1 answer
1k views

run netcat on crontab

I have 2 systems 1: 192.168.0.31 2: 192.168.0.32 From system 1 terminal I executed below command tar -zcf - test | pv | nc -l -p 5555 -q 5 From system 2 terminal I executed below command nc 192....
shaji's user avatar
  • 51
2 votes
1 answer
2k views

Generate SSH key on Ubuntu Server or on own computer

I installed Ubuntu Server (22.04) on an empty server and I am accessing it on my own computer through MobaXterm. For one of the applications I want to install on the server I need an SSH key. Since I ...
cbass's user avatar
  • 25
2 votes
2 answers
2k views

How to work remotely on Ubuntu from another Ubuntu [14.04.3]?

I have a machine at home and a second at work. Both run the same version of Ubuntu 14.04.3. I want to be able to connect to my home computer from the one at work. I want to see my desktop and work ...
so_user's user avatar
  • 135
1 vote
1 answer
1k views

How do you add the password into ~/.ssh/config file for custom ssh connections

I have multiple ssh connections I want to add to the config file in the .ssh directory, but it seems the password field is not catered for. Below is the error I get: Is there any workaround for this?
Conrad96's user avatar
1 vote
0 answers
2k views

SSH asking password each time i run start-all.sh for hadoop

I have installed Hadoop on following path: /opt/hadoop Also installed openssh-server with following commands: sudo apt-get install openssh-server openssh-client After this I created RSA keys with ...
Girish Khole's user avatar
1 vote
1 answer
883 views

How to run same query on multiple servers via the jump server

I have many servers like sdeuu1, sdeuu2, sdeuu3,.. etc. I want to run a query on each one of them and the query is : grep -i 'SponsoredLinksIFrame.jsp' /home/nextag/httpd_logs/access_log.1360* | ...
Vipin Verma's user avatar
  • 5,454
3 votes
2 answers
1k views

Sync settings/software on multiple machines

I have the following scenario which I'm trying to solve: I use 3 Computers, all of them are running Xubuntu (same LTS version). Now I am looking for a way to keep them in sync in terms of: - ...
basti_b24's user avatar

15 30 50 per page