-4

As discussed here, we can SSH remote to Ubuntu Server instance, and run command, and open a prompt

ssh -t host 'cmd1; cmd2; sh -i'

Though the shell prompt I get on my Ubuntu Server is not the default one i.e. as I try to run ~ ./bashrc, I get the error as below snapshot.

So my need is

ssh -t host 'cmd1; cmd2; OPEN_DEFAULT_PROMPT'

where OPEN_DEFAULT_PROMPT will open default Ubuntu Server shell prompt right after cmd1; cmd2.

Community
  • 1
  • 1
Nam G VU
  • 33,193
  • 69
  • 233
  • 372
  • 1
    Stackoverflow is for help with software development. This would be more at home on [unix.se] or [su]. – Kenster Sep 27 '16 at 10:49
  • then I suggest you post same thing to this question too http://stackoverflow.com/a/9302005/248616 – Nam G VU Sep 27 '16 at 10:52
  • If this questions is closed, then I will surprise to see why this one, http://stackoverflow.com/a/9302005/248616, not closed and feel different with the current admin guys working here! – Nam G VU Sep 27 '16 at 11:25

1 Answers1

0

Simply it is bash instead of sh -i i.e.

ssh -t host 'cmd1; cmd2; bash'
Nam G VU
  • 33,193
  • 69
  • 233
  • 372