Tag Info

Hot answers tagged

19

For SSH connections, you can create a user configuration file ~/.ssh/config and place the mappings there e.g. Host server1 Hostname 111.222.111.222 You can easily add other fields such as Port (for non-standard ports) and User (useful if your username on the remote system differs from that on the local system). See man ssh_config for full details.


12

Steeldriver is right. On directory you need also x access flag to be able to list files inside. Fixing the directory using chmod 700 ~/.ssh should help you to get into this (correct) state: $ ls -ld ~/.ssh drwx------. 2 user user 4096 Aug 26 10:37 /home/user/.ssh Also you should fix your keys using chmod 600 ~/.ssh/id_rsa and chmod 644 ~/.ssh/*.pub to ...


12

Yes, just write them down in the file /etc/hosts. It has the following syntax: 1.2.3.4 servername additional_servername Where: 1.2.3.4 is the IP address servername is the name additional_servername is an optional name After saving, you can reach the server by its name.


6

Of course for your particular issue you want to follow @chaos and @steeldriver advices, but in the general case, in order to "permanently store values in the terminal", you are looking to shell variables. How to set them will depend on your shell (I guess echo $SHELL will provide the relevant information). If by "permanently" you mean "as long as I don't ...


1

When reconfiguring a package with dpkg-reconfigure, you can choose between the dialog interface and a text-based readline interface on the command line using the -f or --frontend switch, e.g. sudo dpkg-reconfigure -f readline tzdata Alternatively, you can change the default frontend by reconfiguring the debconf package itself. From man dpkg-reconfigure: ...


1

There isn't any special ssh elastic cloud compute sauce! Rather, each newly created user needs a separate ssh directory and authorized key file. First, from you EC2 server, switch to your newly create user account ('foo' in this example): su foo Next, create an SSH directory for foo and set permissions: mkdir .ssh && chmod 700 .ssh ...


1

It seems your configuration lacks a port 80 forwarding from your router to 1.1.1.1:80.


1

I urge everybody to put the following line at the top and not at the bottom of /etc/pam.d/sshd as described above previously (now corrected): auth required pam_google_authenticator.so Otherwise your system will remain open to brute force attacks on your password, comprimising the first part of the two-factor authentication: your password. You will be ...


1

You can have several backups when you use the rsync option --link-dest. rsync will create another directory with your backup tree, hardlink the files that didn't change, and only copy the changed files. That way you don't use twice the space. For excample: rsync -a --delete --link-dest=../previous_backup source_directory/ backup You have to use a ...



Only top voted, non community-wiki answers of a minimum length are eligible