Auto login

Hi,

Is there any way I can setup Konsole to automatically login to a remote
host and automatically enter a few post login commands…

/jlar


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=407118

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why would you want ‘konsole’ to do this? Konsole is an application to
hold shells and doesn’t really do anything with remote machines except
hold shells that could login to those remote machines. With that said
you could easily write a script that ran your commands on a remote
machine and put that into the login areas for users (Control Center:
Sessions for user-specific applications to be loaded during GUI login)
and it would all happen behind the scenes. Use Public Key
authentication with SSH to prevent a need for passwords and you’ll be set.

Also the more information you provide about your end goal the better we
can help. The ‘konsole’ part may just be a lack of understand about
what ‘konsole’ does, and running commands on a remote machine may be
done more-easily by running commands on this machine and sending data to
a remote machine via syslog.

Good luck.

eeijlar wrote:
> Hi,
>
> Is there any way I can setup Konsole to automatically login to a remote
> host and automatically enter a few post login commands…
>
> /jlar
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJjEvI3s42bA80+9kRApY5AJ94Vdt/8lC0RMA7cOWE7YdGmm5HrgCdHe4B
CCTCpJ6kSQxCiXH5YmNxJrM=
=3n7p
-----END PGP SIGNATURE-----

Hi thanks for your reply. Yes I could use ssh for the auto login I
suppose, but then after it logs in, I would also like it to cd into a
directory and source a profile for that particular remote host. The
profile sets up stuff like:

Code:

export PATH=$PATH:/oracle/product/10.2.0/bin

along with about 20 other things. I was using a tool called Putty
Connection Manager in Windows which could do this. You simply clicked on
the remote host, it automatically logged in, changed into the profile
directory, sourced the profile, set the terminal type, did an stty
command… stuff like that. I don’t want to have to do this every time I
log into the remote host.

thanks,
jlar


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=407118

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Again, this is trivial to do with SSH, as that is exactly what Putty was
probably using (it’s the default for it) to connect to a remote machine.
Putty is just a windows version of the SSH application that ships with
every other OS in the world. Check out Novell TID# 7000350 (from
http://support.novell.com/) for information on setting up keys. Once
you have it setup you can make your SSH call and make all of the
sourcing part of what the user does during the login.

Good luck.

eeijlar wrote:
> Hi thanks for your reply. Yes I could use ssh for the auto login I
> suppose, but then after it logs in, I would also like it to cd into a
> directory and source a profile for that particular remote host. The
> profile sets up stuff like:
>
>
> Code:
> --------------------
> export PATH=$PATH:/oracle/product/10.2.0/bin
> --------------------
>
>
> along with about 20 other things. I was using a tool called Putty
> Connection Manager in Windows which could do this. You simply clicked on
> the remote host, it automatically logged in, changed into the profile
> directory, sourced the profile, set the terminal type, did an stty
> command… stuff like that. I don’t want to have to do this every time I
> log into the remote host.
>
> thanks,
> jlar
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJjHMJ3s42bA80+9kRAi25AJ9fpWNFU5WHV7ZE8mEo/K87GVs9uwCgivSQ
AWgcgJ9Cb1H1IZE2aiXaG7Y=
=WTZf
-----END PGP SIGNATURE-----

hi,

thanks for your reply… you helped me to setup ssh before and I got it
working again for this. That bit is perfect. My question is how do I do
the post login commands, such as sourcing the profile. I was thinking of
putting the ssh command into a bash script, but it trys to run the cd
command locally instead of on the remote host: eg:

Code:

ssh -X me@remoteserver
cd profiles
source linux.profile
clear


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=407118