ssh (secure shell) is a replacement for remote terminal programs like "telnet", "rlogin", etc.. The difference to telnet is that the whole communication is encrypted so even if it is intercepted an intruder cannot gain anything from it.
Like telnet too it consists of two parts: a server- and a client-part. The client part initiates the communication. It is the program you call when you issue
The server part is named "sshd". You can find it in the process list by issuing
The server part will take the incoming communication requests and handle them.
The first thing you need to do is to configure the server part on a machine you want to connect to. This is done in the file "/etc/sshd_config" and you can find numerous examples for a simple yet working configuration. You need a startup routine so that "sshd" is started automatically at system startup (depends on the system), but for a first test it suffices to issue
as user root, which starts it in background.
Now let us consider we have two systems with a running server process and we want to connect from one to the other. We simply issue
and if everything is running correctly we are greeted with a login prompt and asked for a password ("user2" has to exist of course).
Because we would not want to enter the password every time we connect we can "create" and "exchange" keys: instead of passwords you can generate key sequences and put these on the other server. These keys reside in the directory "~/.ssh" (per default), which will be created when you generate such a key. Switch to the user you want to use and issue
and follow the prompts leaving everything at default. Use "RSA" as encryption mechanism. DO NOT enter a password when asked but instead press "ENTER". You will see some files in this directory now:
The file "id_rsa.pub" is your public key. Suppose you want to connect from host "host2" as user "user2" to this host as user "user1". Open another window in which you connect to "host2" as "user2". Then create a file "~/.ssh/authorized_keys" into which you paste the contents of the aforementioned file "id_rsa.pub"
You are now able to remotely log in to "host1" as "user1" from here. If you want to be able to connect to another host as another user (or even the same host as another user) you have to create a keyfile with this other user and put it also into the file "authorized_keys". This file can hold as many keys as you want, you just put one after the other.
Note that if user1@host1 is allowed to connect to "host2" as "user2", this does not mean that the other direction is allowed to. "user2@host2" will still have to enter the password if he wants to connect to "host1" as "user1" - you will again have to create the key file and put it in the file "authorized_keys" of the other user to enable passwordless login in the other direction.
I hope this helps.
bakunin
These 2 Users Gave Thanks to bakunin For This Post:
i am run SUSE 6.4 with apache that i built and maintain to serve my dads website, (www.farragutmarine.com for anyone who cares) anyway i am running samba and i have a huge problem, throughout the day, everything goes fine, but then my server will come to a grinding halt, if i try to telnet in or... (4 Replies)
I am trying to ssh into a remote sun server, however I get X11 forwarding error. I have checked sshd_config file and X11 forwarding is enabled.
Also xhost command doesnt give any output, it doesnt even return the prompt.I have to Ctrl C out of the situation. any suggestions anyone?? (1 Reply)
hi
Recently the above option has stopped working all together. On clicking on this option it appears as though the window will open as the outline of the box appears but nothing more.
On running this from a command prompt within the GUI , I get the following error:
The last line... (0 Replies)
Hi all.
I'm having real trouble authenticating users against active directory for my SCO UnixWare 7.1.4 box running samba 3.0.24 (installed via Maintenance pack 4). I can list AD users/groups (after overcoming several hiccups) with wbinfo -g / wbinfo -u. I can use id to get a view an ad user ie:... (0 Replies)
Hi I have an issue with a client. He was able to use his mounted Samba share for a long time. However, a couple of days ago, he wasn't able to access all of his files all of a sudden. He still see's the share and majority of the files, but not some that he needs.
I checked with Secure CRT on... (1 Reply)
I have created an LPAR and the next step is to get SAMBA installed, I have mounted our NIM server up and copied over the SAMBA binaries .bff files. How do i install these? i tried doing this through SMIT but had no luck..? Any help would be greatly appreciated. AIX OS 6.1 (2 Replies)
Hi all, I'm trying to update my samba 3.5.10 to 3.6.5 due to security CVE issued with 3.5.
I downloaded and unzipped, did the make and make install and the ./configure.
I didn't use any changes to it and it said it installed correctly added it to my path and it looks like it's operating... (6 Replies)
The situation: i have a AD server with samba4,all clients
ssh-kerberos works fine,except hpux :p wich works
only for few days..then i must re-export(sic!) the keys with
samba-tool domain exportkeytab 11.keytab --principal=host/hpux.fqdn
Why after few days ssh return error "server not found... (1 Reply)